Ref: The Complete Reference Java 4 Edition: Ms - Nagasundari 1 Department of ISE, PESIT
Ref: The Complete Reference Java 4 Edition: Ms - Nagasundari 1 Department of ISE, PESIT
}
}
Ms.Nagasundari Department of ISE, PESIT 13
Relational Operators:
class rel_op
{
public static void main(String args[])
{
int a=5,b=3,c=7,d=9;
if ( a == b) System.out.println(“a and b equal");
else if ( a < b) System.out.println(“a less then b");
else System.out.println(“a greater then b");
if( a>b && a>c) System.out.println(“a is greater");
if( a>b || a>c) System.out.println(“a maybe greater");
}
}