public class OutterTest
{
public static void main(String[] args)
{
Outter out = new Outter();
out.show(11);
}
}
class Outter
{
public void show(final int a)
{
class Inner
{
public void show1()
{
System.out.println(a);
}
}
new Inner().show1();
}
}
为什么在方法内的类只能访问带final的局部变量呢?