class Out
{ int x=4;
void methd(final int a)
{
class Inner
{ final int y=5;
void show(){
System.out.println("a="+a);
}
}
new Inner().show();
}
}
public class InnerClassDemon1 {
public static void main(String[] args){
Out out=new Out();
out.methd(6);
out.methd(7);
}
},为什么还能out.methd(7)呢,虽说老师视频理解了是栈的问题,但是还是不太明白求解释..谢谢 |
|