//temp2 is a hashmapwell if u understand the code ...( i dont see any issues here)..read on
Set set2=temp2.entrySet();
Iterator iHash2=set2.iterator();
while(iHash2.hasNext()){
Map.Entry me2= (Map.Entry) iHash2.next();
System.out.println(me2.getKey());
}
I printed the order in which the elements were entered in the HashMap and later printed the hashMap using the above algorithm... both are different.... Any idea why??