请问属于单例模式的类是?()
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;
}
}