Section 2.8 Decision Making: Equality and Relational Operators

• The if statement (p. 54) makes a decision based on a condition’s value (true or false).

• Conditions in if statements can be formed by using the equality (== and !=) and relational (>, <, >= and <=) operators (p. 54).

• An if statement begins with keyword if followed by a condition in parentheses and expects one statement in its body.

• The empty statement (p. 57) is a statement that does not perform a task.

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.