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?
About Question enthuware.ocpjp.v8.2.1317 :
Moderator: admin
-
- Posts: 4
- Joined: Sat Mar 05, 2016 2:15 pm
- Contact:
-
- Site Admin
- Posts: 10396
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocpjp.v8.2.1317 :
Your understanding is incorrect. I will suggest you to read about this topic from a good book before proceeding with the questions.
Who is online
Users browsing this forum: Bing [Bot] and 8 guests