title: How is this HashSet producing sorted output?
body: <p>The following code produces the out put <code>[1,2]</code>even though hashset is not sorted.</p>
  
  <pre><code>Set set = new HashSet();
  set.add(new Integer(2));
  set.add(new Integer(1));
  System.out.println(set);
  </code></pre>
  
  <p>Why is that?</p>