The Comparable interface is a basic interface found within the java Lang package. It is used to implement natural ordering of objects in a specific class and allows objects of a class to be verified as equal or comparable against each other. This interface provides a compare To() method, which allows your object to be compared with another object of the same type and will return either 1 if it is larger than the other, 0 if it's equal, or 1 if smaller than the other object.
read more..