HashMap map = new HashMap();
map.put("05", "500");
map.put("04", "400");
map.put("03", "600");
map.put("01", "100");
Object[] key = map.keySet().toArray();
Arrays.sort(key);
for (int i = 0; i < key.length; i++) {
System.out.println(map.get(key[i]));
}
No comments :
Post a Comment