Title: While Loops
Course: CPS 161: An Intro to Programming with Java - DL MM MASTER > Section: Learning Units - Bb

Presentations and Videos

- While Loops lecture video (Time: 00:00)
- While Loops document

- while(boolean_expression) statement;
- executes 0 or more times depending on the "boolean_expression"
- Using { ... } to create compound statements
- boolean expressions are identical to those used in "if" statements
- do statement; while(boolean_expression);
- executes 1 or more times depending on the "boolean_expression"
- Examples: WhileExamples.java, Averager.java, WhileDemo.java