Self-Review Exercises

4.1 Fill in the blanks in each of the following statements:

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

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

c) Repeating a set of instructions a specific number of times is called ________ repetition.

d) 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.

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

f) Instance variables of types char, byte, short, int, long, float and double are all given ...

Get Java™ How To Program (Early Objects), Tenth 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.