title: What is 'natural ordering' in a TreeMap?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/571388/how-can-i-sort-the-keys-of-a-map-in-java">How can I sort the keys of a Map in Java?</a>  </p>
  </blockquote>
  
  
  
  <p>In class <code>TreeMap</code> the Java API says:</p>
  
  <blockquote>
    <p>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.</p>
  </blockquote>
  
  <p>What is meant by natural ordering ? A class used as key does not have to implement the <code>Comparable</code> interface, but what ordering will be used instead ?</p>