Self-Review Exercises

5.1Fill in the blanks in each of the following statements:
  1. Typically, _____ statements are used for counter-controlled repetition and _____ statements are used for sentinel-controlled repetition.

  2. The do...while statement tests the loop-continuation condition _____ executing the loop’s body; therefore, the body always executes at least once.

  3. The _____ statement selects among multiple actions based on the possible values of an integer variable or expression.

  4. 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.

  5. The _____ operator can be used to ensure that two conditions are both true before choosing a certain path of execution. ...

Get Java™ How to Program, Seventh Edition 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.