About Question enthuware.ocpjp.v7.2.1272 :

Help and support on OCA OCP Java Programmer Certification Questions
1Z0-808, 1Z0-809, 1Z0-815, 1Z0-816, 1Z0-817

Moderator: admin

Post Reply
jagoneye
Posts: 97
Joined: Wed Dec 28, 2016 9:00 am
Contact:

About Question enthuware.ocpjp.v7.2.1272 :

Post by jagoneye »

Complicated example which could have been much simpler. :(

jagoneye
Posts: 97
Joined: Wed Dec 28, 2016 9:00 am
Contact:

Re: About Question enthuware.ocpjp.v7.2.1272 :

Post by jagoneye »

Code: Select all

int mid = (from+to)/2;
ComplicatedTask newtask1 = new ComplicatedTask(ia, from, mid); ComplicatedTask newtask2 = new ComplicatedTask(ia, mid+1, to); 
invokeAll(newtask1,newtask2);
sum = newtask1.join()+newtask2.join();
This is the code that I studied from CoreJava.
So does this code execute in multi-threads or perform computations locally only?

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests