class NiMingLei
{
public static void main(String[] args)
{
Outer out= new Outer();
out.function(7);
out.function(8);
}
}
class Outer
{
static int y=4;
void function(final int a)
{
class Inter
{
void method()
{
System.out.println(a);
}
}
new Inter().method();
}
}
为啥可以编译运行通过:
7
8
不是final a 了吗?不是a的值不能改变了吗?