public static void mystery(int n) {
if (n <= 0) return;
mystery(n - 1);
System.out.print(n + " ");
}
mystery(3);What is printed?
- Acheck_circle
1 2 3
- B
3 2 1
- C
0 1 2 3
- D
3 2 1 0
Explanation
The print happens AFTER the recursive call, so each value prints as the calls unwind, producing ascending output.