package learntocode.patterns.singleton;


public class SingletonLazyInitHolder  {
    private static class InstanceHolder {
        public static SingletonLazyInitHolder holder = new SingletonLazyInitHolder();
    }

    public static SingletonLazyInitHolder getInstance() {
        return InstanceHolder.holder;
    }
}

@@ -36,16 +36,125 @@
 ton;%0D%0A%0D%0A
+/**%0D%0A * The JVM defers creation of holder until it's actually needed, so this approach works as a charm.%0D%0A */
 %0D%0Apublic

Comment update