67,513
社区成员
发帖
与我相关
我的任务
分享
class Singleton {
private Singleton() {
System.out.println(" singleton ");
}
private static Singleton s = new Singleton();
public static Singleton getInstance() {
return new Singleton(); // 改成 new 一个实例就可以了
}
}