摘要: 无意中在csdn的论坛看到这样一个程序段:class Singleton { private static Singleton obj = new Singleton(); public static int counter1; public static int counter2 = 0; private Singleton() { counter1++; counter2++; } public static Singleton getInstance() { return obj; } } public class MyMain { p... 阅读全文
posted @ 2011-03-10 20:32 qm4050 阅读(109) 评论(0) 推荐(0)