sort (students, (Student h1, Student h2) -> h1.getName().compareTo(h2.getName()));. 在Java8 中,List类中增加了sort方法,所以Collections.sort可以直接替换为:.
確定! 回上一頁