About Question enthuware.ocpjp.v7.2.1522 :

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

Moderator: admin

Post Reply
Nisim123
Posts: 42
Joined: Mon Jan 20, 2014 2:26 pm
Contact:

About Question enthuware.ocpjp.v7.2.1522 :

Post by Nisim123 »

Sorry for such a silly comment, but still option 2 {Thread T2's wait() times out.} sounds not bad at all...
after all it says that thread T2 called the obj.wait() method- so it does hold the lock for the object obj,
Then it says at the 2nd part of the question that Thread T1 also holds the lock on object obj.
I can just suppose that T1 is still processing object obj, otherwise it sound like a deadlock or something.... :?

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

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

Post by admin »

If thread T2 has called the obj.wait() method, why do you think it will still have the lock for the object obj?
Wait releases the lock.

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 3 guests