Exercises

  1. A.7 Fill in the blanks in each of the following statements:

    1.            are used to document a program and improve its readability.

    2. A decision can be made in a Java program with a(n)           .

    3. Calculations are normally performed by            statements.

    4. The arithmetic operators with the same precedence as multiplication are and           .

    5. When parentheses in an arithmetic expression are nested, the            set of parentheses is evaluated first.

    6. A location in the computer’s memory that may contain different values at various times throughout the execution of a program is called a(n)           .

  2. A.8 Write Java statements that accomplish each of the following tasks:

    1. Display the message "Enter an integer: ", leaving the cursor ...

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.