O'Reilly logo

Programmer's Guide to Java™ Certification, A: A Comprehensive Primer, Second Edition by Rolf W. Rasmussen, Khalid A. Mughal

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

3.9. Relational Operators: <, <=, >, >=

Given that a and b represent numeric expressions, the relational (also called comparison) operators are defined as shown in Table 3.6.

Table 3.6. Relational Operators
a < ba less than b?
a <= ba less than or equal to b?
a > ba greater than b?
a >= ba greater than or equal to b?

All relational operators are binary operators, and their operands are numeric expressions. Binary numeric promotion is applied to the operands of these operators. The evaluation results in a boolean value. Relational operators have precedence lower than arithmetic operators, but higher than that of the assignment operators.

 double hours = 45.5; boolean overtime = hours >= 35.0; // true. boolean order = 'A' < 'a'; // true. Binary numeric ...

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