09-12 Class Notes CS 107

09-12 Class Notes CS 107 - break and continue 2 Note that...

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

View Full Document Right Arrow Icon
Note new posting for lab this week - Java API link updated on website main page - I really do recommend you understanding the sample code given as part of program #2. - Announcements: Questions? if statement, switch statement, while loop along with break and continue Last Time: Consider code to check a single character and see if it is in "precaution" a. Using the debugger in Eclipse on the sample code for program #2 1. Program to display menu & keep looping to get input until it is valid using continue a. Program to break out of a loop when 'x' to exit is chosen b. Example small programs using
Background image of page 1

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

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: break and continue 2. Note that the relational operators can also be used with while and do while loops. Loops: while loop, continued… 3. int lineCounter = 1; // use a loop to display a line of asterisks int counter = 0; System.out.print("*"); counter++; // increment the counter while( counter < lineCounter) { }// end while( counter. . lineCounter++; System.out.println(); while( lineCounter <= number) { }//end while( lineCounter Today: 09-12 Class Notes CS 107 Monday, September 12, 2011 1:16 PM CS 107 Fall 2011 Page 1 CS 107 Fall 2011 Page 2...
View Full Document

This note was uploaded on 02/10/2012 for the course COP 2273 taught by Professor Lin during the Fall '11 term at University of Central Florida.

Page1 / 2

09-12 Class Notes CS 107 - break and continue 2 Note that...

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

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