Self-Review Exercises

4.1

Fill in the blanks in each of the following statements:

  1. All programs can be written in terms of three types of control structures:           ,            and           .

  2. The            statement is used to execute one action when a condition is true and another when that condition is false.

  3. Repeating a set of instructions a specific number of times is called            repetition.

  4. When it’s not known in advance how many times a set of statements will be repeated, a(n)            value can be used to terminate the repetition.

  5. The            structure is built into Java; by default, statements execute in the order they appear.

  6. Instance variables of types char, byte, short, int, long, float ...

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.