Self-Review Exercises (Sections C.1–C.13)

  1. C.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. 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.

    4. Java is a(n)            language; it requires all variables to have a type.

    5. If the increment operator is            to a variable, first the variable is incremented by 1, then its new value is used in the expression.

  2. C.2 State whether each of the following is ...

Get Android How to Program, 3/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.