// Project Recursive // Class Main // Practice problem: predict the output by first // drawing the recursion tree. public class RecursiveTrace { 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) + " "); } } }