O'Reilly logo

Java™ How To Program (Early Objects), Tenth Edition by Harvey Deitel, Paul Deitel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required