class InOut
{
String str=new String("hellomyth");
public void amethod( int iArgs)
{
int it315=315;
class Bicycle
{
public void say()
{
System.out.println(str);
System.out.println(iArgs);
System.out.println(it315);
}
}
Bicycle bike=new Bicycle();
bike.say();
}
}
public class TestF
{
public static void main(String args[])
{
InOut obj=new InOut();
obj.amethod(33);
}
}【图片】IArgs、it315都是方法method()中的非final类型变量,为什么运行无错,还成功打印出33,315??
{
String str=new String("hellomyth");
public void amethod( int iArgs)
{
int it315=315;
class Bicycle
{
public void say()
{
System.out.println(str);
System.out.println(iArgs);
System.out.println(it315);
}
}
Bicycle bike=new Bicycle();
bike.say();
}
}
public class TestF
{
public static void main(String args[])
{
InOut obj=new InOut();
obj.amethod(33);
}
}【图片】IArgs、it315都是方法method()中的非final类型变量,为什么运行无错,还成功打印出33,315??