public class recursion {
public static void main(String[] args)
{
thisclass(0);
}
public static void thisclass(int z)
{
int x = 1;
int y = 3;
if (z==10)
{
System.out.println("Done");
}
else
{
System.out.println(x/y);
x++;
y= y+2;
thisclass(z++);
}
}
}
我学习递归现在,当我到达的thisclass
方法else语句,我得到一个错误,它打印零的异常量之后。学习递归调用错误,当类
我希望程序做的就是运行10次,做沿着打印1/3 2/5 3/7线的东西是什么等
我在哪里去了?
仅供参考,“thisclass”是一种方法,而不是一类,这是非常令人困惑。 .. – sashkello 2013-04-10 01:47:54