Wap to use Relational Operator in Java
class Relational
{
public static void main (String []arg)
{
int a=10,b=20;
System.out.println("Variable a="+a+"and b="+b);
System.out.println("The Below statement(a==b) is false");
System.out.println(a==b);
System.out.println("The Below statement(a!=b) is false");
System.out.println(a!=b);
System.out.println("The Below statement(a>b) is false");
System.out.println(a>b);
System.out.println("The Below statement(a<b) is false");
System.out.println(a<b);
System.out.println("The Below statement(a<=b) is false");
System.out.println(a<=b);
System.out.println("The Below statement(a>=b) is false");
System.out.println(a>=b);
}
}
Comments
Post a Comment