jdk1.8以上去掉List集合中的空字符串

2019独角兽企业重金招聘Python工程师标准>>> hot3.png

List filtered=list.stream().filter(string -> !string.isEmpty()).collect(Collectors.toList());

转载于:https://my.oschina.net/u/3078232/blog/3019331

你可能感兴趣的:(jdk1.8以上去掉List集合中的空字符串)