Self-Review Exercises
5.1
(Fill in the Blanks) Fill in the blanks in each of the following statements:
-
Typically, statements are used for counter-controlled repetition and statements for sentinel-controlled repetition.
-
The
do
…while
statement tests the loop-continuation condition executing the loop’s body; therefore, the body always executes at least once. -
The statement selects among multiple actions based on the possible values of an integer variable or expression.
-
The statement, when executed in a repetition statement, skips the remaining statements in the loop body and proceeds with the next iteration of the loop.
-
The operator can be used to ensure that ...
Get Java How to Program (early objects), 9/e now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.