List<Student1> list = new ArrayList<>();
list.add(new Student1("测试", "男", 18));
list.add(new Student1("开发", "男", 20));
list.add(new Student1("运维", "女", 19));
list.add(new Student1("DBA", "女", 22));
list.add(new Student1("运营", "男", 24));
list.add(new Student1("产品", "女", 21));
list.add(new Student1("经理", "女", 25));
list.add(new Student1("产品", "女", 21));
List<Student1> l1 = list.stream().filter(student1 -> student1.getSex().equals("男"))
.collect(Collectors.toList());
Map<Boolean, List<Student1>> map = list.stream()
.collect(partitioningBy(student1 -> student1.getSex().equals("男")));
Integer sum = list.stream().filter(student1 -> student1.getSex().equals("男")).mapToInt(Student1::getAge).sum();
Map<String, Integer> map1 = list.stream()
.collect(Collectors.groupingBy(Student1::getSex, Collectors.summingInt(p -> 1)));
boolean check = list.stream().anyMatch(student -> student.getAge() > 25);
List<String> l2 = list.stream()
.map(Student1::getName).collect(Collectors.toList());
double avg = list.stream().collect(averagingInt(Student1::getAge));
Student1 s = list.stream().reduce((student1, student2) -> student1.getAge() > student2.getAge() ? student1:student2).get();
Student1 stu = list.stream().collect(Collectors.maxBy(Comparator.comparing(Student1::getAge))).get();
List<Student1> l3 = list.stream()
.sorted(Comparator.comparing(Student1::getAge))
.collect(Collectors.toList());
List<Student1> l = list.stream().sorted(Comparator.comparing(Student1::getAge).reversed())
.collect(Collectors.toList());
List<Student1> l4 = l3.stream().limit(2)
.collect(Collectors.toList());
String str = list.stream().map(Student1::getName)
.collect(Collectors.joining(",", "[", "]"));
IntSummaryStatistics intSummaryStatistics = list.stream()
.mapToInt(Student1::getAge).summaryStatistics();