About Question enthuware.ocpjp.v8.2.1510 :
Posted: Mon Mar 28, 2016 2:48 pm
Not really because some other code could modify cache directly, bypassing the synchronised block.Synchronizing on this may not help if the same cache object is exposed in any other class. synchronized(cache){ ... } is a possible solution.