title: Stuck with "java.util.ConcurrentModificationException"
body: <p>Here is my code:</p>
  
  <pre><code>// eventList is a LinkedList
  
  public void run() {
  
      Iterator&lt;Event&gt; it = eventList.iterator();
      int size = eventList.size();
  
      while(size &gt; 0) {
          while(it.hasNext()) {
              Event e = it.next(); //flaged line
  
              if(e.ready()) {
                  System.out.println(e);
                  e.action();
                  eventList.remove(e);
                  --size;
              }
          }
      }
  }
  </code></pre>
  
  <p>The error <code>java.util.ConcurrentModificationException</code> is thrown at the flag lined (<code>Event e = it.next();</code>). Do you see a mistake in my code that makes obvious the reason of that exception to be thrown? </p>