¥The
interface Comparable
is built-in to Java (part of the core library java.lang)
has the following definition
¥ interface Comparable {
int compareTo(Object
other);
}
The value returned by compareTo is negative, zero, or positive depending on whether this is less than other, equal to other, or
greater than other.
¥The
built-in class String also
implements the interface CharSequence which includes methods such as int length(). The
built-in class StringBuffer (mutable
strings) also implements this interface.