摘要: public class StaticVariableTest {
private static StaticVariableTest svt = new StaticVariableTest();//語句(1)
private static int count1;//語句(2)
private static int count2 = 0;//語句(3)
private StaticVariableTest(){//語句(4)
count1++;
count2++;
}
public static StaticVariableTest getInstance(){//語句(5)
return svt;
}
public static int getCount1() {
return count1;
}
public
閱讀全文