title: How to Sort a HashTable
body: <p>May i know why my hashtable number is not in order? after reach certain number. Please, really need help from expert. Any helps would be appreciated. Thanks alot!! Code in jsp file.</p>
  
  <pre><code>&lt;%
  Vector vRow2      = new Vector();
  Vector vFruit     = new Vector(); 
  Hashtable htItem  = new Hashtable();
  
  vRow2.addElement("apple");
  vRow2.addElement("banana");
  vFruit.addElement(vRow2);
  
  htItem.put("1", vFruit);
  htItem.put("2", vFruit);
  htItem.put("3", vFruit);
  htItem.put("4", vFruit);
  htItem.put("5", vFruit);
  htItem.put("6", vFruit); // if htItem put only up to 6 it show correct order result 6,5,4,3,2,1
  htItem.put("7", vFruit); // if htItem put up to 7 it show incorrect order result 6,5,4,3,2,1,7
  htItem.put("8", vFruit); // if htItem put up to 8 it show result 6,5,4,3,2,1,8,7
  htItem.put("9", vFruit); // if htItem put up to 9 it show correct order 9,8,7,6,5,4,3,2,1
  htItem.put("10", vFruit); // if htItem put up to 10 it show incorrect order result 9,8,6,5,4,3,2,10,1
  
  System.err.println("htItem==="+htItem);
  %&gt;
  </code></pre>
  
  <h2>output</h2>
  
  <p><code>htItem==={9=[[apple, banana]], 8=[[apple, banana]], 7=[[apple, banana]], 6=[[apple, banana]], 5=[[apple, banana]], 4=[[apple, banana]], 3=[[apple, banana]], 2=[[apple, banana]], 10=[[apple, banana]], 1=[[apple, banana]]}</code> </p>
  
  <p>expected output : <code>10,9,8,7,6,5,4,3,2,1</code></p>
  
  <p>how to make the number of list are in correct sequence every time htItem put new number.?</p>