public class Singleton { private static class Holder { // lazy class static final Singleton instance = new Singleton(); } public static Singleton getInstance() { return Holder.instance; } }