Java Singleton Pattern

  • + 1 comment

    What for do you need additional inner holder class? You already has laze initialisation with this:

    class Singleton{
    	private Singleton() {}
        
        private static final Singleton INSTANCE = new Singleton();
        
        public static Singleton getInstance() {
        	return INSTANCE;
        }
    }