摘要: 再次踩bug:遍历删除list(java.util.ConcurrentModificationException)使用List list = new ArrayList();for(Long l : list){ if(l == 5){ list.remove(l); }} for(int i=0; i list = new ArrayList();Iterator it = list.iterator();while(it.hasNext){ if(it.next() == 5){ it.remove();//注意此处不能用list.re... 阅读全文
posted @ 2014-03-11 11:44 BaronZ 阅读(549) 评论(0) 推荐(0) 编辑