title: Java LinkedList safest way to delete while iterating
body: <p>I remember from a while back (I think it was some Java book) that the safest way to delete an element while iterating through a collection is using <code>iterator.remove</code>.</p>
  
  <pre><code> while(iterator.hasNext())
   {
      if(it.next().condition())
        iterator.remove();
   }
  </code></pre>
  
  <p>As I cannot find that reference and need a relative quick confirmation, can some java veteran confirm this?</p>