Skip to content

ConcurrentModificationException #1

Description

@JavaZakariae

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 .

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions