默认升序
先以年龄升序排序
年龄相同是 按分数降序
List<Student> list= userList.stream().sorted(Comparator.comparing(Student::getAge).thenComparing(Student::getScore,Comparator.reverseOrder())).collect(Collectors.toList());
标签:Comparator,stream,Student,升序,sorted,排序,java8 From: https://www.cnblogs.com/fchhk/p/17102560.html