public class Test {
* @param args
*/
public static void main(String[] args) {
//调用内部类B
A.B d=new A().new B();
d.func();
}
static class A {
int x = 1;
class B {
int x = 2;
void func() {
int x = 3;
System.out.println( A.this.x + "," + B.this.x + "," + x);
}
}
}
} |
|