0


Relational Operators – Relational operators are used to compare the value of operands (expressions) to produce a logical value. A logical value is either true or false.

Operators
Meaning
Example
Result
< 
Less than
5>2
False
> 
Greater than
5>2
True
<=
Less than or equal to
5<=2
False
>=
Greater than or equal to
5>=2
True
==
Equal to
5==2
False
!=
Not equal to
5!=2
True



Example : -
class Geekyshows
{
    public static void main (String args[])
    {
        int a = 10;
        int b = 20;
        boolean c  = a < b;
        System.out.println("Result: "+c);
    }
}


Post a Comment

Comment Rules :
1. Do not post Adult/illegal Links.
2. Try to comment in only English Language.
3. Do not post other website's links which are useless.
4. Your Comment should be based on the Topic for other queries Kindly Visit our Contact Us Page.
5. Do not use Abusive Language.
6. Respect each other.
Thank You for following the rules. Please Comment....

 
Top