Page 1 of 1

About Question enthuware.ocpjp.v8.2.1317 :

Posted: Mon Dec 16, 2019 2:51 pm
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?

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

Posted: Mon Dec 16, 2019 10:33 pm
by admin
Your understanding is incorrect. I will suggest you to read about this topic from a good book before proceeding with the questions.