ITM 200 Chapter 6: Chapter 6

63 views3 pages

Document Summary

The while loop, general syntax: while () { Example: int number = 1; while (number <= 200) { Sentinel value is an input value to signify to end the loop. Executes statements repeatedly while a condition is t rue, testing it at the end of each repetition www. notesolution. com. Similar to a while loop, except that its body statement(s) will always execute the first time, regardless of whether the condition is t rue or false. A do-while loop can be used to replace a while loop if the loop body has to be executed before testing the continuation condition. the do/while loop, general syntax: do { If you want to stop the loop, if a if" condition is t rue, then exit the loop, like: while (some condition) { A java statement that executes a group of statements repeatedly until a given test fails.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents

Related Questions