Online Java Compiler By
JavaTpoint.com
public class IntegerCompareUnsignedExample2 { public static void main(String[] args) { //compares two Integer values numerically Integer x = 98; Integer y= -8; int retResult = Integer.compareUnsigned(x,y); if(retResult > 0) { System.out.println("x is greater than y"); } else if(retResult< 0) { System.out.println("x is less than y"); } else { System.out.println("x is equal to y"); } } }
Output