// Project: Recursion // Module: trace2 // Source code file: Main.java // Practice problem: Draw the recursion tree, then predict the output. public class Main { public static void main(String[ ] args) { f(3); } public static void f(int n) { if (n > 0) { System.out.print(n + " "); f(n - 1); System.out.print(n + " "); f(n - 2); System.out.print((n + 1) + " "); } } }