This is Also, from Dan's mock exam on
Thread...
It is either not possible or not advisable to synchronize on which of the following?
a. primitives
b. A member variable that is an object reference.
c. A local variable that is an object reference.
d. A randomly selected object.
answer is: acd.
a is obviously one of the answer, but why c and d?
Any examples showing the reason for c and d are appreciated.