About Question enthuware.ocpjp.v8.2.1567 :

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

Moderator: admin

Post Reply
schchen2000
Posts: 106
Joined: Mon Mar 28, 2016 11:36 pm
Contact:

About Question enthuware.ocpjp.v8.2.1567 :

Post by schchen2000 »

The thread object on which join() has to be called must be waiting for a lock.
This answer choice is wrong because of the phrase "must be waiting for a lock."

It could have been a correct answer without that phrase because the thread that calls join() has to pause until another thread finishes its run() method and POSSIBLY to combine the results.

Is that correct?

I noticed you use the word "pause" when you said

"The thread that calls the join() method, pauses until the other thread ends (i.e. finishes its run() method.) There is no need for any thread to hold any lock."

Is "pause" equivalent to saying the wait() method has been called at least "under the hood" to make that thread to pause, i.e. a thread that is on join() is also on wait() at least implicitly?

Is that a reasonable thing to say?

Thanks.

Schmichael

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

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

Post by admin »

Yes to both.
If you like our products and services, please help us by posting your review here.

schchen2000
Posts: 106
Joined: Mon Mar 28, 2016 11:36 pm
Contact:

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

Post by schchen2000 »

admin wrote:Yes to both.
Thank you.

Schmichael

Post Reply

Who is online

Users browsing this forum: No registered users and 228 guests