62,620
社区成员
发帖
与我相关
我的任务
分享
成功了耶!多谢多谢!!!
试试我写的那个public class Test {
public static void main(String[] args) {
X xxx = new X();
X.Y y = xxx.new Y();
y.func();
}
}
class X {
int i = 1;
class Y {
int i = 2;
void func() {
int i = 3;
System.out.println(X.this.i);
System.out.println(this.i);
System.out.println(i);
}
}
}