title: Removing items from a list
body: <p>While looping through a list, I would like to remove an item of a list depending on a condition. See the code below.</p>
  
  <p>This gives me a <code>ConcurrentModification</code> exception.</p>
  
  <pre><code>for (Object a : list) {
      if (a.getXXX().equalsIgnoreCase("AAA")) {
          logger.info("this is AAA........should be removed from the list ");
          list.remove(a);
      }
  }
  </code></pre>
  
  <p>How can this be done?</p>