public class TestSingleton { private TestSingleton(){} public static TestSingleton getInstance(){ return SingletonEnum.INSTANCE.getTest(); } private enum SingletonEnum{ INSTANCE; private TestSingleton singleton = null; SingletonEnum(){ singleton = new TestSingleton(); } private TestSingleton getTest(){ return singleton; } } }