Java Comparable interface is used is used to impose a natural ordering sorting. This interface is found in java.lang package and contains only one method named compareTo(Object).
It provides single sorting sequence i.e. in comparable, only one sort sequence can be created. We need to modify the class whose instances we want to sort.
Lists and Arrays of objects that implement comparable interface can be sorted automatically by Collections.sort() (and Arrays.sort()).
Objects which implement Comparable in Java can be used as keys in a SortedMap like TreeMap or elements in a SortedSet for example TreeSet.