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()代替
标签:splits,Arrays,list,删除异常,asList,String From: https://www.cnblogs.com/wangweiip/p/16725514.html