Showing posts with label Relational Operators. Show all posts
Showing posts with label Relational Operators. Show all posts

Java Relational Operators / Chapter -4 /Operator & Assignments



relational operators


java relational operators


1.These are the relational operators in java.


                          < ,<=,>,>=


2.These operators can be used for every primitive data type. But we can't apply these operators for boolean type.


example:-


System.out.println(10<20);    output  is       true


System.out.println('b'<20);    output  is         false   (hint: b's unicode value is greater )


System.out.println('b'<99.7);    output  is      true (hint: b's unicode value is lower)


System.out.println(true<false);   Compile Time Error(Cannot Applied to Boolean)


 


3.Relational Operators cannot be applied on Objects types.


example:-

Java - Relational Operators / Chapter -4 /Operator & Assignments

javabychetan.blogspot.com

1.These are the relational operators in java.

                          < ,<=,>,>=

2.These operators can be used for every primitive data type. But we can't apply these operators for boolean type.

example:-

System.out.println(10<20);    output  is       true

System.out.println('b'<20);    output  is         false   (hint: b's unicode value is greater )

System.out.println('b'<99.7);    output  is      true (hint: b's unicode value is lower)

System.out.println(true<false);   Compile Time Error(Cannot Applied to Boolean)

 

3.Relational Operators cannot be applied on Objects types.

example:-

Flipkart End Of Season Sale






© Copyright 2017 Javabychetan.blogspot.com