### Question:
CollectorsDemo { public void map(List<Student> students){ List<String> names = students.stream() .filter(student -> "计算机科学".equals(student.getMajor())) .map(Student::getName).collect(Collectors.toList()); System.out.println("map: " + names); int totalAge = students.stream() .filter(student -> "计算机科学".equals(student.getMajor())) .mapToInt(Student::getAge).sum(); System.out.println("mapToInt totalAge: " + totalAge); String[] strs = {"java8", "is", "easy", "to", "use"}; List<String> distinctStrs = Arrays.stream(strs) .map(str -> str.split("")) .flatMap(Arrays::stream) .distinct() .collect(Collectors.toList()); System.out.println("flatMap: distinctStrs" + distinctStrs); }  void filter(List<Student> students, List<Integer> nums); void map(List<Student> students); void match(List<Student> students); void reduce(List<Student> students); void collect_reduce(List<Student> students); void collect_group(List<Student> students); void collect_partitioning(List<Student> students);  }### Answer:
@Test public void map(){ collectorsDemo.map(studentList); }