一、例1
1.问题
public class Demo01_StaticTest {
private static Demo01_StaticTest st = new Demo01_StaticTest();
public static int count1;
public static int count2 = 0;
private Demo01_StaticTest(){
count1++;
count2++;
}
public static Demo01_StaticTest getInstance(){
return st;
}
public static void main(String[] args) {
Demo01_StaticTest st = Demo01_StaticTest.getInstance()