总结如下:其中第一种为Student中的name属性的getName方法,第二种是map中的键
// Listlist List names = students.stream().map(Student::getName).collect(Collectors.toList()); // List

总结如下:其中第一种为Student中的name属性的getName方法,第二种是map中的键
// Listlist List names = students.stream().map(Student::getName).collect(Collectors.toList()); // List