In Java, which interface (class) should implement the class (extend) to allow two instances of the class to be comparable through relational operators like "<" or "> ="?
In Java, this is not possible.
If you want the objects of your class to be comparable, run Comparable .
Comparable
Java does not support operator overloading, so you're out of luck. Implementing java.lang.Comparable or providing java.util.Comparator is what you should be doing.
java.lang.Comparable
java.util.Comparator