title: TreeMap high-low key Integer sort
body: <pre><code>    Map&lt;Integer, String&gt; map = new TreeMap&lt;Integer, String&gt;();
  
      // Add Items to the TreeMap
      map.put(new Integer(8), "Eight");
      map.put(new Integer(9), "Nine");
      map.put(new Integer(1), "One");
      map.put(new Integer(4), "Four");
      map.put(new Integer(10), "Ten");
      map.put(new Integer(5), "Five");
      map.put(new Integer(6), "Six");
      map.put(new Integer(2), "Two");
      map.put(new Integer(3), "Three");
      map.put(new Integer(7), "Seven");
  
      keys = map.keySet();
      for (Iterator i = keys.iterator(); i.hasNext();) {
        Integer key = (Integer) i.next();
        String value = (String) map.get(key);
        System.out.println(key + " = " + value);
      }
  </code></pre>
  
  <h3>Output:</h3>
  
  <ul>
  <li>1 = One</li>
  <li>2 = Two</li>
  <li>3 = Three</li>
  <li>4 = Four</li>
  <li>5 = Five</li>
  <li>7 = Seven</li>
  <li>8 = Eight</li>
  <li>9 = Nine</li>
  <li>10 = Ten  </li>
  </ul>
  
  <p>I would like to reverse this integer sort of the TreeMap,
  So the highest integer will be at the front and the lowest and the end, How can I accomplish this? Thanks in advance.</p>