DEV Community

Cover image for relat06_02.java
darKLoin
darKLoin

Posted on • Edited on

relat06_02.java

// Relational Operators // problem: // relat06_02.java{wirte java program showing the waorking of all Relational Operators.} class relat06_02 { public static void main(String args[]) { int x= 10 , y= 11; System.out.println("Value of x = "+x+" and value of y = "+y); System.out.println("Equal to operator always give the boolean response."); System.out.println("Is "+x+" == "+y+" => "+(x==y)); System.out.println("Not Equal to operator is also give the boolean response."); System.out.println("Is "+x+" != "+y+" => "+(x!=y)); System.out.println("Greater than also give the boolean response."); System.out.println("Is "+x+" > "+y+" => "+(x>y)); System.out.println("Greater than Equal to also give the boolean response."); System.out.println("Is "+x+" >= "+y+" => "+(x>=y)); System.out.println("Lesser than also give the boolean response."); System.out.println("Is "+x+" < "+y+" => "+(x<y)); System.out.println("Lesser than Equal to also give the boolean response."); System.out.println("Is "+x+" <= "+y+" => "+(x<=y)); System.out.println("ENDING THE PROGRAM...\n:-) THANK YOU (-:"); } } 
Enter fullscreen mode Exit fullscreen mode

Top comments (0)