title: Concurrent Modification Error for Object ArrayList
body: <p>I have searched for an answer to my problem but nothing has worked. 
  This is my code.</p>
  
  <pre><code>public ArrayList&lt;Exercise&gt; checkList()
  {
      Criteria a = this.getCriteria();
      ArrayList&lt;Exercise&gt; z = this.getExercise();
      for(Exercise c : z)
      {
          if(!compareSkillLevel(c,a)|| !compareEquipment(c)|| !compareFocus(c)
                  || !compareTraining(c))
              z.remove(c);
      }
      return z; 
  
  }
  </code></pre>
  
  <p>After running this I get a Conncurrent Modification Exeption. </p>
  
  <pre><code>Exception in thread "main" java.util.ConcurrentModificationException
  at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:859)
  at java.util.ArrayList$Itr.next(ArrayList.java:831)
  at randomworkout.List.checkList(List.java:161)
  at Main.main(Main.java:46)
  </code></pre>
  
  <p>How do I solve this?</p>