The most popular implementation of this potter is as follows:
public class BillPughSingleton { private BillPughSingleton(){} private static class SingletonHelper{ private static final BillPughSingleton INSTANCE = new BillPughSingleton(); } public static BillPughSingleton getInstance(){ return SingletonHelper.INSTANCE; } } This option has a lazy initialization, but I don’t understand what makes it thread-safe, there’s no volatile and synchronize right there ... Could you explain?