Product SiteDocumentation Site

5.4.4.2. compareTo

This method compares the receiving object to the object supplied in the comparable argument.

>>-compareTo(other)---------------------------------------><

This method returns "-1" if the other is larger than the receiving object, "0" if the two objects are equal, and "1" if other is smaller than the receiving object.