checkforcomodification专题

java.util.ConcurrentModificationException: null at java.util.ArrayList$Itr.checkForComodification

比较两个集合中的数据,根据id日期等条件判断重复了就把集合2中的重复那个移除,最后把2个集合合并返回. 刚开始是用双for循环,但是报错如上,百度后改成iterator那个形式