Exercises
2.7 Fill in the blanks in each of the following statements:
-
are used to document a program and improve its readability.
-
A decision can be made in a Java program with a(n) .
-
The arithmetic operators with the same precedence as multiplication are and .
-
When parentheses in an arithmetic expression are nested, the set of parentheses is evaluated first.
-
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.8 Write Java statements that accomplish each of the following tasks:
-
Display the message
"Enter an integer: ", leaving the cursor on the same ...
-
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access