关于就JAVA中成员变量的访问
public class Demo {
public int i;
public static int j;
public void test() {
i = 0;
j = 1;
}
}
public class testDemo {
public static void main(String[] args) {
Demo demo = new Demo();
demo.test();
System.err.println(demo.i);
System.err.println(Demo.j);
}
}
i 必须要用对象调用;
j由于是静态的可直接类名调用

浙公网安备 33010602011771号