package com.gang;
import java.io.File;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.StringJoiner;
import java.util.stream.Collectors;
public class Test08 {
public static void main(String[] args) {
Student student = new Student("121", "21221", "jdoijwa");
Student student1 = student.copyStudent();
List<Student> students = Arrays.asList(new Student("999", "21221", "jdoijwa"),
new Student("121", "21221", "jdoijwa"));
System.out.println(students.stream().limit(1).collect(Collectors.toList()));
//StringJoiner可以指定拼接的前缀或者后缀
StringJoiner joiner = new StringJoiner("%", "%", "%");
joiner.add("dada");
joiner.add("dada");
System.out.println(joiner.toString());
//通过Arrays.asList生成的集合必须要 重新定义一个集合进行添加,然后用removeif操作来进行删除
List<Student> students11=new ArrayList<>();
students11.addAll(students);
students11.removeIf(e->e.getGrade().equals("121"));
System.out.println(students11.size());
//可以先利用stream过滤出我们要删除的集合然后传参传进去就可以进行删除了
//students.removeAll()
}
}