List<String> st= Stream.of("a,b,c,d,e,f".split(",")).collect(Collectors.toList());
List<String> str=Stream.of("d,e,f".split(",")).collect(Collectors.toList());
st.removeAll(str);
System.out.println(st);
sout:
老办法:https://blog.csdn.net/lihua5419/article/details/86543251