About Question enthuware.ocpjp.v8.2.1317 :

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

Moderator: admin

Post Reply
philcave
Posts: 4
Joined: Sat Mar 05, 2016 2:15 pm
Contact:

About Question enthuware.ocpjp.v8.2.1317 :

Post by philcave »

I thought that a monitor object (in this example Object) only synchronized the block for objects of the same type as the monitor object...
So I thought that since the threads created in the code were both Test objects, the synchronized block would not be synchronized for Test objects, only for Object objects...?
Or have I totally misunderstood how this monitor object works for synchronized blocks?

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

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

Post by admin »

Your understanding is incorrect. I will suggest you to read about this topic from a good book before proceeding with the questions.

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 8 guests