public class MyClass implements Comparable {
    public int compareTo(Object o) {
        // If this < o, return a negative value
        // If this = o, return 0
        // If this > o, return a positive value

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.