Java Reference
In-Depth Information
Figure 6
Inspecting Variables
266
267
You should step into a method to check whether it carries out its job correctly. You
should step over a method if you know it works correctly.
Finally, when the program has finished running, the debug session is also finished. To
run the program again, you may be able to reset the debugger, or you may need to exit
the debugging program and start over. Details depend on the particular debugger.
S ELF C HECK
11. In the debugger, you are reaching a call to System.out.println .
Should you step into the method or step over it?
12. In the debugger, you are reaching the beginning of a method with a
couple of loops inside. You want to find out the return value that is
computed at the end of the method. Should you set a breakpoint, or
should you step through the method?
Search WWH ::




Custom Search