懒加载
2018-11-05 本文已影响0人
陈皮丨阿四
private static Singleton s;
private Singleton() {}
public static Singleton getInstance() {
if (s == null) {
s = new Singleton();
}
return s;
}
private static Singleton s;
private Singleton() {}
public static Singleton getInstance() {
if (s == null) {
s = new Singleton();
}
return s;
}