Iterator<String> it = list.iterator();
while(it.hasNext()){
String x = it.next();
if(x.equals("del")){
it.remove();
}
}
Iterator<String> it = list.iterator();
while(it.hasNext()){
String x = it.next();
if(x.equals("del")){
it.remove();
}
}
本文标题:集合中循环删除数据
本文链接:https://www.haomeiwen.com/subject/ygssjftx.html
网友评论