test.stream().sorted(Comparator.comparing(Worker::getAge).reversed()
.thenComparing(Worker::getName).reversed()
.thenComparing(Worker::getSalary))
.collect(Collectors.toList())
.forEach(System.out::println);
和
test.stream().sorted(Comparator.comparing(Worker::getAge).reversed()
.collect(Collectors.toList())
.forEach(System.out::println);
相比,年龄的倒序没出来。