51,409
社区成员
发帖
与我相关
我的任务
分享public class StaticTest{
public static Test sTest = new Test();
public static int a=0;
public static int b;
public static void main(String[] args) {
// TODO Auto-generated method stub
System.out.println(StaticTest.a);
System.out.println(StaticTest.b);
}
}
class Test {
public Test() {
StaticTest.a++;
StaticTest.b++;
}
}