class Outter
{
private int num;
private void show()
{
System.out.println("老师辛苦了");
}
class Inter
{
public int amend(int num)//这里返回值类型是int型-------------------------------------问题在这里????????
{ show(); //为什么我的这个函数可以成功打印出其内容
return num;
}
}
public void print()
{
Inter i = new Inter();
Object obj = i.amend(15);
System.out.println(obj);
}
}
class Outter
{
private int num;
public static void main(String[] args)
{
print();
}
private void show()
{
System.out.println("老师辛苦了");
}
static class Inter
{
public static int amend(int num)
{
new Outter().show();
return num;
}
}
public static void print()
{
//Inter i = new Inter();
Object obj = Inter.amend(15);
System.out.println(obj);
}
}