list排序
public static void main(String[] args) {
List<String> list= new ArrayList<>();
list.add("11:23");
list.add("22:34");
list.add("22:04");
Collections.sort(list, new Comparator<String>() {
@Override
public int compare(String o1, String o2) {
int h1=Integer.valueOf(o1.split(":")[0]);
int h2=Integer.valueOf(o2.split(":")[0]);
int m1=Integer.valueOf(o1.split(":")[1]);
int m2=Integer.valueOf(o2.split(":")[1]);
if(h1==h2)
return m1-m2;
return h1-h2;
}
});