class A{
int x = 3;
class B{
int x = 4 ;
void function(){
int x = 5;
System.out.println("x=" + x);
System.out.println("x=" + this.x);
System.out.println("x=" + new A().x);
}
}
void show(){
B b = new B();
b.function();
}
}
class Demo_Test{
public static void main(String[] args) {
A a = new A();
a.show();
}
}
我也很菜,自己打的。。 |