title: How to add values to a list while iterating it
body: <p>I Have a scenario such like this</p>
  
  <pre><code>List&lt;String&gt; xxx = new ArrayList
  for(String yyy : xxx){
     for(String zzz:xyxy){
       if(!zzz.equals(yyy)){
         xxx.add(zzz);
       }
     }
  }
  </code></pre>
  
  <p>But i get java.util.ConcurrentModificationException: null exception.Can anyone help me solve this issue.? Can anyone give me alternate method to perform this ?</p>