Relational Operators in Java
Posted by
Ravi Kumar at Friday, March 13, 2009
Share this post:
|
0 Comments
In java to test for equality we can use a double equal sign, ==. For example, the
value of
5 == 8
is false.
Use a != for inequality. For example, the value of
5 != 8
is true.
Also we have the usual < (less than), > (greater than), <= (less than or equal),
and >= (greater than or equal) operators.