请问如何打印void method()中的final int y=4?
class Outer
{
int x=3;
int y=5;
void method()
{
final int y=4;
class Inner
{
int y=6;
void show()
{
int y=7;
System.out.print(y);
}
}
new Inner().show();
}
}
class InnerDemo
{
public static void main(String[] args)
{
new Outer().method();
}
} |
|