public static void mystery(int n) {
if (n <= 0) return;
System.out.print(n + " ");
mystery(n - 1);
}
mystery(3);What is printed?
- Acheck_circle
3 2 1
- B
0 1 2 3
- C
3 2 1 0
- D
1 2 3
Explanation
The print happens BEFORE the recursive call, so values print from largest to smallest as the recursion descends.