CSC300: functions [5/6] |
01 |
package algs11; import stdlib.*; public class Hello { public static void main (String[] args) { Trace.drawSteps (); Trace.run (); f (0); g (0); } public static void f (int i) { StdOut.println (i); } public static void g (int i) { if (i < 3) { StdOut.println (i); g (i + 1); } } } |
Method calls are shown as red boxes
Method name and line number are listed
Arrow shows where the function will return to