//单例模式之饿汉式
public class Singleton {
private Singleton() {
// TODO Auto-generated constructor stub
}
private static Singleton instance = new Singleton();
public static Singleton getInstance(){
return instance;
}
}
1924
240
211

被折叠的 条评论
为什么被折叠?