// Project: Recursion // Module: trace1 Example // Source code file Main.java. // Practice problem: predict the output by // drawing the recursion tree. public class Main { public static void main(String[] args) { f(4); System.out.println( ); g(4); } public static void f(int n) { if (n > 0) { f(n - 1); System.out.print(n + " "); } } public static void g(int n) { if (n > 0) { System.out.print(n + " "); g(n - 1); } } }