Object obj=new Object(); Object obj2=obj; synchronized(obj){} synchronized(obj2){} what if this is the case? Object obj=new Object(); synchronized(obj){} obj=new Object(); synchronized(obj){} ...
We know that DCL double lock is written as: synchronized (SingletonLazy5.class) { if(null == singletonLazy) { singletonLazy = new SingletonLazy5(); } } ...