单列模式 [java] view plain copy print ? public class A { // 私有静态内部类, 只有当有引用时, 该类才会被装载 private static class LazyA { public static A A = new A(); } public static A getInstance() { return LazyA.A; } }