You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 .
The text was updated successfully, but these errors were encountered:
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 .
The text was updated successfully, but these errors were encountered: