I\'m finding conflicting advice over the best way to avoid a ConcurrentModificationException while doing this:
ConcurrentModificationException
List Apples = appleC
List apples = appleCart.getApples(); for (Iterator appleIterator = apples.iterator(); appleIterator.hasNext();) { Apple apple = appleIterator.next(); if ( apple.isYucky() ) { appleIterator.remove(); } }