多线程 Java.util.ConcurrentModificationException异常

  1. Iterator<Entry<String,Boolean>> iter = set.iterator();  
  2.         while(iter.hasNext()){  
  3.             Entry<String,Boolean> entry = iter.next();  
  4.             String key = entry.getKey();  
  5.               
  6.         }  


这里的next会抛出Java.util.ConcurrentModificationException。
在网上很多人都说,用了romove办法,这里,我没调用过remove。原因没明。
原文地址:https://www.cnblogs.com/shihao/p/2315609.html