摘要: 问题描述: 有一个list集合,其中元素是Student对象,根据student的age排序。 Student对象 此类需要实现Comparable接口,重写compareTo方法 测试类: 利用Collections.sort()方法进行重排序。 输出结果: 正序倒序,只需改变实体中的compar 阅读全文
posted @ 2018-09-29 10:11 在谷歌上百度 阅读(753) 评论(0) 推荐(0) 编辑