Java tutorial
//package com.java2s; import java.util.*; public class Main { public static List sortMapByValueASC(Map map) { List list = new ArrayList(map.entrySet()); Collections.sort(list, new Comparator() { public int compare(Object o1, Object o2) { return ((Comparable) ((Map.Entry) (o1)).getValue()).compareTo(((Map.Entry) (o2)).getValue()); } }); return list; } }