Possible Duplicate:
How can I sort the keys of a Map in Java?
In class TreeMap
the Java API says:
A Red-Black tree based NavigableMap implementation. The map is sorted according to the natural ordering of its keys, or by a Comparator provided at map creation time, depending on which constructor is used.
What is meant by natural ordering ? A class used as key does not have to implement the Comparable
interface, but what ordering will be used instead ?