java execute for cycle parallel thread

Java
fooCollection.parallelStream().forEach(foo -> {
  			//DO things here
            foo.count();
        });

//Check exception version
fooCollection.parallelStream().forEach(foo -> {
  			//DO things here
  			try{
            	foo.count();
            }catch(Exception e){ 
              throw new RuntimeException(e);
            }
        });
Source

Also in Java: