Wednesday, 25 April 2018

Core Java: Relational Operator

Operator
Description
Usage
Example (x=5, y=8)
==
Equal to
expr1 == expr2
(x == y) → false
!=
Not Equal to
expr1 != expr2
(x != y) → true
Greater than
expr1 > expr2
(x > y) → false
>=
Greater than or equal to
expr1 >= expr2
(x >= 5) → true
Less than
expr1 < expr2
(y < 8) → false
<=
Less than or equal to
expr1 >= expr2
(y <= 8) → true

No comments:

Post a Comment

Please write your view and suggestion....