If a singleton is implemented as follows,
class Singleton { private static Singleton instance = new Singleton(); public static Singleton getInstance
For lazy loading singleton instance, I am using as below.
class Singleton { private static Singleton instance; private Singleton(){ } public static Singleton getInstance() { if(null==instance){ synchronized(Singleton.class){ if(null==instance){ instance = new Singleton(); } } } return instance; } }