当前位置: 代码迷 >> 综合 >> list集合排序大体格式
  详细解决方案

list集合排序大体格式

热度:102   发布时间:2023-09-06 21:23:59.0
Collections.sort(list, new Comparator<BaseConStaticListBO>() {@Overridepublic int compare(BaseConStaticListBO o1, BaseConStaticListBO o2) {return Integer.parseInt(o1.getName().substring(0,1))-Integer.parseInt(o2.getName().substring(0,1));//从小到大}
});
  相关解决方案