请问属于单例模式的类是?() public class A{ private static A a = new A(); private A(){}; public static A getA(){ return a; } } public class B{ private static B b = null; private B(){}; public static B getB(){ b = new B(); return b; } } public class C{ private static C c = null; static{ c = new C(); } private C(){}; public static C getC(){ return c; } }
发布于 2020-12-25 16:51:16
登录后免费查看答案
关注者
0
被浏览
241