class Outer
{
int num = 3;
void method()
{
int y = 6;
class Inner
{
void show()
{
System.out.println(y);
}
}
new Inner().show();
}
}
class InnerDemo4
{
public static void main(String[] args)
{
Outer o = new Outer();
o.method();
}
}
- -我没有final 局部变量啊 为啥能编译运行 |
|