public static void main(String[] args) { String s ="waf,ggjkf,gjri"; String[] splits =s.split(","); List<String> list = Arrays.asList(splits); list.remove("waf"); System.out.println(splits); }
List<String> list = Arrays.asList(splits);不允许序list删除元素,可以用Stream.of()代替
本文来自博客园,作者:狂躁的键盘,转载请注明原文链接:https://www.cnblogs.com/wangweiip/p/16725514.html