About Question enthuware.ocpjp.v8.2.1241 :

All the posts and topics that contain only an error report will be moved here after the error is corrected. This is to ensure that when users view a question in ETS Viewer, the "Discuss" button will not indicate the presence of a discussion that adds no value to the question.

Moderators: Site Manager, fjwalraven

Post Reply
Martyjee
Posts: 32
Joined: Tue Oct 06, 2015 9:06 am
Contact:

About Question enthuware.ocpjp.v8.2.1241 :

Post by Martyjee »

There are two answers that are almost the same, namely:

[*]Subclass RecursiveAction and implement the compute() method that computes the new value but does not return anything.
[*]Implement compute() method in RecursiveAction that computes the new value but does not return anything.


The second answer is marked as correct, but I think the first answer is even more accurate, and therefore correct as well. The question asks what would be a good approach and subclassing RecursiveAction is certainly a good approach (together with answer #6)!

Kind regards,

Martijn

admin
Site Admin
Posts: 10402
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.ocpjp.v8.2.1241 :

Post by admin »

You are right. Fixed.
thank you for your feedback!

mrmuiz
Posts: 49
Joined: Mon Jul 27, 2015 4:34 am
Contact:

Re: About Question enthuware.ocpjp.v8.2.1241 :

Post by mrmuiz »

Why is option 3
Create a RecursiveAction that subdivides the task and submit all such tasks to a ForkJoinPool.
not correct?
By forking the subtask we're submitting it to the pool. Does the answer intend a new ForkJoinPool (that would make the answer wrong) or am I missing something?

admin
Site Admin
Posts: 10402
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.ocpjp.v8.2.1241 :

Post by admin »

As the explanation says, there is no need to "submit" the tasks to the pool while the option says, "and submit all such tasks to a ForkJoinPool".

HTH,
Paul.

mrmuiz
Posts: 49
Joined: Mon Jul 27, 2015 4:34 am
Contact:

Re: About Question enthuware.ocpjp.v8.2.1241 :

Post by mrmuiz »

I've read the explanation, my confusion comes from the fact that the solution actually submits the task to the pool via fork() method.

admin
Site Admin
Posts: 10402
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.ocpjp.v8.2.1241 :

Post by admin »

OK, I see now what you mean. You are right. The option is not clear. I have updated it to say "...and submit all such tasks to the pool using submit method".

thank you for your feedback!
Paul.

Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests