Integer i=new Integer(1000);
Integer j=new Integer(1000);
System.out.println((i<=j)+" "+(i>=j)+" "+(i!=j));
i and j will be automatically unboxed to ints for <= and >=, but not for !=. i and j are different instances, but have the same int value. That's why all three comparisons will return true.