Java.lang.Comparable: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
 
Line 16: Line 16:
}
}
</syntaxhighlight>
</syntaxhighlight>
A class that implements Comparable is said to have a ''natural order''.

Latest revision as of 19:11, 29 March 2018

External

Internal

Overview

public interface Comparable<T> {

    int compareTo(T o)

}

A class that implements Comparable is said to have a natural order.