I understand that you can't use == or != to compare values of numeric objects and have to use .equals() instead. But after a fair amount of searching I haven't been able to find a statement about whether or not you can use the other comparison operators, other than suggestions to use .compare() or .compareTo() which feel inefficient because they require two comparisons: a to b, then the result of that to zero.
Despite == and != comparing the addresses of the objects, the other comparison operators appear to compare the numeric values. For instance the following code snippet:
Integer a = new Integer(3000);
Integer b = new Integer(3000);
System.out.println("a < b " + (a < b));
System.out.println("a <= b " + (a <= b));
System.out.println("a == b " + (a == b));
System.out.println("a >= b " + (a >= b));
System.out.println("a > b " + (a > b));
produces
a < b false
a <= b true
a == b false
a >= b true
a > b false
Which appears to indicate all operators but == compare the value, not the address of the object. Is it accepted usage to use the <= class of operators, or just an unsupported feature of my compiler or something?