ConcurrentModificationException

?java.util.ConcurrentModificationException-->并发修改异常,在遍历集合过程中修改集合内容会抛出此异常。
【ConcurrentModificationException】解决方法:

for (Object entity : objectList){ //throw ConcurrentModificationException objectList.remove(entity); } ---> for (Iterator it= objectList.iterator(); it.hasNext(); ){ it.next(); it.remove(); }

    推荐阅读