饿汉式单例类不能实现延迟加载,不管将来用不用始终占据内存:懒汉式单例类线程安全控制烦琐,而且性能受影响.有种更好的单例模式叫做Initialization Demand Holder (IoDH)的技术. public class Singleton { private Singleton(){ System.out.println(Singleton.class); } private static class HolderClass{ private final static Singlet…