String multilineString = "Baeldung \n \n developers \n Java.Baeldung helps \n \n developers \n Java.";
//按照换行符读取字符串
List collect = multilineString.lines()
.filter(line -> !line.isBlank())
.map(String::strip)
.collect(Collectors.toList());
//删除指定的字符
Stream baeldung_helps = collect.stream().dropWhile(t -> t.equalsIgnoreCase("developers"));
List collect1 = baeldung_helps.collect(Collectors.toList());
//获取指定的字符
Stream baeldung_helps1 = collect.stream().takeWhile(t -> t.equalsIgnoreCase("developers"));
List collect11 = baeldung_helps1.collect(Collectors.toList());
//集合转变为数组
Object[] objects = collect.toArray();
//读取文件流
FileInputStream fileInputStream = new FileInputStream("D:\\ZK\\2.txt");
FileOutputStream outputStream = new FileOutputStream("D:\\ZK\\1.txt");
//复制文件
fileInputStream.transferTo(outputStream);
Path path = Paths.get("D:\\ZK\\2.txt");
//读取文件
String s = Files.readString(path);
//文件写入
Files.writeString(path , "你好");
//创建集合
List integers = List.of(1, 2, 3, 2, 2, 2);
List integers1 = List.of(1, 2, 3, 2, 2, 5);
//复制集合
Set integers3 = Set.copyOf(integers);
System.out.println(integers3);
//创建map ,其中key 不可以重复
Map stringStringMap = Map.of("1", "1");
Map stringStringMap1 = Map.of("1", "1", "2", "2");
List> integers2 = List.of(integers, integers1);
System.out.println("----------------");
List> lists = List.copyOf(integers2);
}