title: Removing an object from a list while also running another list returns error
body: <p>So with this code I am going trough a list and removing an object.</p>
  
  <pre><code>    public void setUpgradeClicked(){
      for (Iterator&lt;Upgrade&gt; iterator = displayedUpgrades.iterator(); iterator.hasNext();) {
          Upgrade u = iterator.next();
          if (u.clicked) {
              iterator.remove();
          }
      }
  }
  </code></pre>
  
  <p>And at the same time this code is running</p>
  
  <pre><code>        for(Upgrade u : displayedUpgrades){
          u.dostuff();
      }
  </code></pre>
  
  <p>So ofcourse I would get an ConcurrentModificationException error but I'd like to fix it, I have no idea how to do it though.</p>
  
  <p>If someone could help me with this that would be great.</p>