title: java: TreeSet order
body: <p>With this code I get this output:</p>
  
  <pre><code> TreeSet&lt;String&gt; t=new TreeSet&lt;String&gt;();
    t.add("test 15");
    t.add("dfd 2");
    t.add("ersfd 20");
    t.add("asdt 10");
  
  
   Iterator&lt;String&gt; it=t.iterator();
  
   while(it.hasNext()){
     System.out.println(it.next);
   }
  </code></pre>
  
  <p>I get: </p>
  
  <pre><code>  asdt 10 
    dfd 2 
    ersfd 20 
    test 15
  </code></pre>
  
  <p>How can I get an order of this kind, based on the numbers, with TreeSet?</p>
  
  <pre><code>  dfd 2 
    asdt 10 
    test 15
    ersfd 20 
  </code></pre>