动态减list中的数据,及字符串数组赋值给list
1、list冬天减数据
List<String> list = new ArrayList<>();
Iterator<String> it = list.iterator();
while(it.hasNext()){
String ss = it.next();
if(ss.indexOf("aa")>-1){
it.remove();
}
}
2、字符串数组赋值给list
String ss = "aaa,bbb,ccc,ddd";
String[] arr = ss.split(",");
List<String> inlist = Arrays.asList(arr);