题目:在以下递归方法中,哪个参数在每次递归调用时都会改变其值?
A. public static void factorial(int n) { if (n == 0) return; System.out.println(n * factorial(n - 1)); }
B. public static int factorial(int n) { if (n == 0) return 1; return n * factorial(n - 1); }
C. public static void factorial(int n) { if (n == 0) return; System.out.println(n / factorial(n + 1)); }
D. public static int factorial(int n) { if (n == 0) return 1; return n / factorial(n - 1); }
答案:评论后可见此内容