Collections.sort(employees, ?(x, y) -> { ? ?if (x.getAge() == y.getAge()) { ? ? ? ?return -x.getName().compareTo(y.getName()); ? ?} else { ? ? ? ?return -Integer.compare(x.getAge(), y.getAge()); ? ?}});這代碼怎么用方法引用精簡一下呢?
添加回答
舉報
0/150
提交
取消