Self-Review Exercises

4.1Fill 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 is 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 and double are all given the value _____ by default.

  7. Java is a(n) _____ ...

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.