L3 - Selection and Repetition Constructs in Java

L3 - Selection and Repetition Constructs in Java - L3 –...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

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

Unformatted text preview: L3 – Selection and Repetition Constructs in Java Loops, while and for How to Master this objective • Read Gaddis, Chapter 4. • Watch Dr. A’s video here: http://faculty.valenciacc.edu/colin_archibald/2800VideoLec ture/07%20Repetition%20- %20Looping/07%20Repetition%20-%20Looping.html • Check out these links from the Learning Objectives document • http://download.oracle.com/docs/cd/E17409_01/javase/tu torial/java/nutsandbolts/while.html • http://download.oracle.com/docs/cd/E17409_01/javase/tu torial/java/nutsandbolts/for.html • Write/enhance a short sketch in class to see how these work in Processing While Loop • Really a repeated if • The while keyword is followed by a boolean expression in parentheses • If true, the loop is entered and repeated while the expression is true • If false, the loop is skipped entirely. Code generated for while int counter = 1 ; while ( counter <=4 ) { // do some stuff counter ++ ; } // more stuff int counter = 1 ; mov counter, 1 while ( counter <=4 )...
View Full Document

This note was uploaded on 03/01/2012 for the course COP 2800 taught by Professor Geraldreed during the Spring '08 term at Valencia.

Page1 / 10

L3 - Selection and Repetition Constructs in Java - L3 –...

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

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