1 public class SingleObj
2 {
3 private static SingleObj OnlyOne = null;
4 private SingleObj()
5 {}
6 public static SingleObj getInstance()
7 {
8
9 if(OnlyOne = null) OnlyOne = new SingleObj();
10 return OnlyOne;
11
12 }
13 }
posted on 2007-02-08 09:23
-274°C 阅读(517)
评论(1) 编辑 收藏 所属分类:
计算机综合