- public class Count {
- static void count(int n) {
- if (n < 10)
- count(n + 1);
- System.out.print(" " + n);
- }
- public static void main(String[] args) {
- count(1);
- System.out.println();
- }
- }
这段程序有人能帮我解释下么,谢谢了。对递归一直不太理解~~~~
这段程序有人能帮我解释下么,谢谢了。对递归一直不太理解~~~~