public class HolderSingleton {
private HolderSingleton() {
}
public static HolderSingleton getInstance() {
return Holder.instance;
}
private static class Holder {
public static final HolderSingleton instance = new HolderSingleton();
}
}
Initialization-on-demand holder idiom 방식(holder에 의한 초기화 방식)
Top comments (0)