Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ConcurrentModificationException #1

Open
JavaZakariae opened this issue Nov 5, 2019 · 0 comments
Open

ConcurrentModificationException #1

JavaZakariae opened this issue Nov 5, 2019 · 0 comments

Comments

@JavaZakariae
Copy link
Owner

JavaZakariae commented Nov 5, 2019

ConcurrentModificationException should be thrown when we try to execute the folowwing for loop
static void doProcess( List list ) {
for (String word:list){
if (word.equals("ik")){
list.remove(word);
}
}
}

input list contains the following String {"Hallo","goed","moest","ik","ging"};

The above code don't throw the ConcurrentModificationException .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant