class StringTest{
int num = 0;
public static void main(String[] args)
{
int n = t.aaa(1);
System.out.println(n);
}
public int aaa(int a){
num = a;
if(a<5){
aaa(a+1);
}
return num;
}
}
与
class StringTest{
public static void main(String[] args)
{
int n = t.aaa(1);
System.out.println(n);
}
public int aaa(int a)
{
if(a<5)
{
aaa(a+1);
}
return a;
}
}
------解决方案--------------------
顶下。。学习了。。。