本帖最后由 何伟超 于 2014-3-16 01:14 编辑
class Outer {
private int x = 3;
class Inner {
private int x = 4;
void show() {
private int x = 5; //这里为什么会提示非法的表达式开始?????
System.out.println("x = " + x);
System.out.println("x = " + this.x);
System.out.println("x = " + Outer.this.x);
}
}
public void show() {
Inner in = new Inner();
in.show();
}
} |