I created a HashMap putting values and keys, the keys are like "01", "02", "03" kind two digits
string. The when I loop through the HashMap, I use
Set set= hm.keySet();
Iterator iter = set.iterator();
while(iter.hasNext()){
String currentKey = iter.next();
// print out this currentKey
}
The print out result shows it is NOT ordered by "01", "02", "03" or alphabetical letter order, which was what I expected.
Why ? and how do I get a loop that output keys in alphabetical letter or digital ascendant order ?