package com.example.demo;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
/**
* @ClassName: StreamTest
* @Description: TODO
* @Author: PiaoYoung
* Date: 2020/2/28 10:00
* Version: 1.0
*/
public class StreamTest {
public static void main(String[] args){
List<String> list = Arrays.asList("Jim","Kate","Lilei","Han Meimei");
System.out.println(list.stream().collect(Collectors.joining()));
System.out.println(list.stream().collect(Collectors.joining(" | ")));
System.out.println(list.stream().collect(Collectors.joining(" | ","[ "," ]")));
System.out.println(list.stream().map(o->o.toUpperCase()).collect(Collectors.toList()));
System.out.println(list.stream().collect(Collectors.joining()));
}
}