title: Changing list while iterating over it and iterating over new elements
body: <p>i was wondering if this is possible, and if it is, how can i do it?
  Basically what i saw, and think is problem is that cursor of iterator is moving when I am using add function(I dont understand iteration perfectly so I dont know if this is problem).The problem happens when i remove one element and then add two more(that is specific case where i found a problem).</p>
  
  <p>My code is something like this:</p>
  
  <pre><code>List&lt;String&gt; list =new ArrayList&lt;&gt;();
  for (ListIterator&lt;String&gt; iterator = list.listIterator(); iterator.hasNext();)
        //here i am adding and removing elements
  </code></pre>