Tutorial03 - Tutorial #3: Loops and the Debugger (Ch 3)...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Tutorial #3: Loops and the Debugger (Ch 3) O P T I O N A L Introduction: This tutorial is recommended if you have little or no experience working with loops or using a debugger. 1. Enter the following program as shown in Fig. 1 and compile it. public class Tutorial { public static void main(String[] args){ int i; i= 0; while (i < 3) { System.out.println(i); i + + ; } } } Fig 1 2. Click on Debugger -> Debugger Mode as shown in Fig. 2 Fig 2
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
including a “Watches” pane on the left and buttons on the right with such labels as “Resume”, “Step Into”, etc. Note that the Watches pane in the figure has been resized to make it more readable. Fig 3 4. Place the cursor on the line that contains “i = 0”. Place a breakpoint here by clicking on Debugger -> Toggle Breakpoint on Current Line as shown in Fig. 4. Fig 4
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 5

Tutorial03 - Tutorial #3: Loops and the Debugger (Ch 3)...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online