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
|
Wednesday, 25 April 2018
Core Java: Relational Operator
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Please write your view and suggestion....