when remove an element of `ArrayList` from inside `foreach` loop. its break the loop.  

throw ConcurrentModificationException  

My question is why its break the loop.

Code. 

```
ArrayList gStudyLst=getLst();
    int recordCount=0;
    for(String study : gStudyLst){
        if(++recordCount < 10){
            if(generateFile(study)){
                gStudyLst.remove(study); // there its break throw ConcurrentModificationException
            }else{
                System.out.println("File not generated"):
                gStudyLst.clear();
                return false;
                }
            }
        }else{
            return true;
        }   
    }

```