01.04 · Practice set
Trace the Output
Placement tests often ask “what does this print?” about recursive code. Write one line per call, indented by depth, and fill in the results on the way back up (see How Java Runs Recursion). Don’t guess from the shape of the code.
Every answer here was checked by running the code in Java.
Item 4 of 44 · updated 2026-10-13