February 2014
Beginner
1248 pages
62h 25m
English
• The if single-selection statement performs an indicated action only when the condition is true.
• The if...else double-selection (p. 105) statement performs one action when the condition is true and another action when the condition is false.
• A program can test multiple cases with nested if...else statements (p. 107).
• The conditional operator (p. 110; ?:) is Java’s only ternary operator—it takes three operands. Together, the operands and the ?: symbol form a conditional expression (p. 110).
• The Java compiler associates an else with the immediately preceding if unless told to do otherwise by the placement of braces.
• The if statement expects one statement in its body. To include several ...
Read now
Unlock full access