java获取List集合中的元素的某一属性的唯一值 获取List集合中Student对象的name属性的唯一值(去除重复的值) List<String> listNew = listStr.stream().map(Student::getName).distinct().collect(Collectors.toList());