SUBJECT MATERIAL, EBOOKS, IMPORTANT QUESTION , ASSIGNMENT QUESTION, OLD QUESTION PAPER

Saturday 12 August 2017

Relational Operators in Java

Relational Operators are used to  check relation between two variables or numbers . Relational Operators are Binary Operators. Relationa... thumbnail 1 summary
  1. Relational Operators are used to check relation between two variables or numbers.
  2. Relational Operators are Binary Operators.
  3. Relational Operators returns “Boolean” value .i.e it will return true or false.
  4. Most of the relational operators are used in “If statement” and inside Looping statement in order to check truthness or falseness of condition.
Operator
Result
Use
Returns true if
==
Equal to
op1 > op2
op1 is greater than op2
!=
Not equal to
op1 >= op2
op1 is greater than or equal to op2
> 
Greater than
op1 op2
op1 is less than to op2
< 
Less than
op1 <= op2
op1 is less than or equal to op2
>=
Greater than or equal to
op1 == op2
op1 and op2 are equal
<=
Less than or equal to
op1 != op2
op1 and op2 are not equal