Regarding sorting a Map
<p>I have one query , I have developed a Map which I want to sort  please advise..</p>

<pre><code>  HashMap map=new HashMap();//HashMap key random order.
     map.put("Amit","Java");
     map.put("Saral","J2EE");
     map.put("ty","Spring");
     map.put("Anupam","Hibernate");
     map.put("Ravi",".Net");
     map.put("Saral","Andriod");//same key but different value 
     map.put("Nitin","PHP");
     map.put("hj","Spring1");
     System.out.println("There are "+map.size()+" elements in the map.");
     System.out.println("Content of Map are...");
     Set s=map.entrySet();
     Iterator itr=s.iterator();
     while(itr.hasNext())
     {
         Map.Entry m=(Map.Entry)itr.next();
         System.out.println(m.getKey()+"\t"+m.getValue()+"\t"+ m.hashCode());
      }
</code></pre>
