Below table lists relational operators in java.
{
public static void main(String[] args)
{
int a = 10, b = 15, c = 15;
System.out.println("Relational Operators and returned values");
System.out.println(" a > b = " + (a > b));
System.out.println(" a < b = " + (a < b));
System.out.println(" b >= a = " + (b >= a));
System.out.println(" b <= a = " + (b <= a));
System.out.println(" b == c = " + (b == c));
System.out.println(" b != c = " + (b != c));
}
}
Output
Relational Operators and returned values
a > b = false
a < b = true
b >= a = true
b <= a = false
b == c = true
b != c = false