Collections.sort(var4, new Comparator() {
public int compare(TreeMap var1, TreeMap var2) {
return ((String)var1.get("col_3")).compareTo((String)var2.get("col_3"));
}
});
答案 0 :(得分:1)
通过添加到Comparator,
尝试这种方式Collections.sort(var4, new Comparator<TreeMap>()
{
public int compare(TreeMap var1, TreeMap var2)
{
return ((String)var1.get("col_3")).compareTo((String)var2.get("col_3"));
}
});