java list删除
摘要:
在foreach循环内不要对list进行删除操作。for循环内可以删除,要用到迭代器或者循环内i-- private void remove(List arraylist) throws Exception{ if(null == arraylist){ throw new Exception("the input parameter is null"); } int l=arraylist.size(); for(int i = 0; i < l ; i++){ Integer element = (Integer)arraylist.get(i); ... 阅读全文
posted @ 2014-03-01 09:12 aiguang 阅读(179) 评论(0) 推荐(0) 编辑