Map<String, Integer> map = new HashMap<String, Integer>();
map.put("aa", 123135);
map.put("bb", 12);
map.put("bbc", 112);
map.put("bbas", 1442);
List<Entry<String, Integer>> list = new ArrayList<Entry<String, Integer>>(map.entrySet());
Collections.sort(list, new Comparator<Entry<String, Integer>>() {
@Override
public int compare(Entry<String, Integer> o1, Entry<String, Integer> o2) {
return o2.getValue().compareTo(o1.getValue());
}
});
for (Entry<String, Integer> entry : list) {
System.out.println(entry.getValue());
}