### Question:
CollectorsDemo { public void collect_reduce(List<Student> students){ long count = students.stream().collect(Collectors.counting()); System.out.println("Collectors.counting(): " + count); Optional<Student> olderStudent = students.stream().collect(Collectors.maxBy((s1, s2) -> s1.getAge() - s2.getAge())); System.out.println("Collectors.maxBy " + olderStudent); Optional<Student> olderStudent2 = students.stream().collect(Collectors.maxBy(Comparator.comparing(Student::getAge))); System.out.println("Collectors.maxBy " + olderStudent2); Optional<Student> olderStudent3 = students.stream().collect(Collectors.minBy(Comparator.comparing(Student::getAge))); System.out.println("Collectors.minBy " + olderStudent3); int totalAge4 = students.stream().collect(Collectors.summingInt(Student::getAge)); System.out.println("Collectors.summingInt " + totalAge4); double avgAge = students.stream().collect(Collectors.averagingInt(Student::getAge)); System.out.println("Collectors.averagingInt " + avgAge); IntSummaryStatistics statistics = students.stream().collect(Collectors.summarizingInt(Student::getAge)); System.out.println("Collectors.summarizingInt " + statistics); String names = students.stream().map(Student::getName).collect(Collectors.joining()); System.out.println("Collectors.joining() " + names); String names2 = students.stream().map(Student::getName).collect(Collectors.joining(", ")); System.out.println("Collectors.joining() " + names2); }  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 collect_reduce(){ collectorsDemo.collect_reduce(studentList); }