CSC300: drawStepsOfMethod [6/6] |
01 |
package algs11; import stdlib.*; public class Hello { public static void main (String[] args) { Trace.drawStepsOfMethod ("f"); Trace.drawStepsOfMethod ("g"); 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); } } } |
drawStepsOfMethod()
causes a drawing to be
created at every step of the named method.
drawStepsOfMethod()
can be called more than once.