volatile/lazy シングルトン、eager シングルトン、ノーマル シングルトン、Enum など、条件に応じてさまざまな方法でシングルトンを開発しましたが、具体的には、以下に示す静的ホルダー パターン シングルトンについて知りたいです。
public static class Singleton {
private static class InstanceHolder {
public static Singleton instance = new Singleton();
}
private Singleton(){}
public static Singleton getInstance() {
return InstanceHolder.instance;
}
}
どのような条件で効果があり、どのような効果があるのか教えてください。