Relational Operators

There are relational operators used for testing whether a value is greater than or equal to another value. They are shown in Table 7-1.

7-1. The Logical Operators
OPERATIONOPERATOREXAMPLE
Equal to==(x == 1)
Not equal to!=( a!= b)
Less than<( i < 10 )
Greater than>( i > j )
Less than or equal to<=(j <= 10)
Greater than or equal to>=( x >= y)

Get Java Garage 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.