๐ Bug HuntJV Java Hard+35 XP
ConcurrentModificationException
This crashes when removing items while iterating.
๐ Find the bug
1
List<String> items = new ArrayList<>(Arrays.asList("a", "b", "c"));2
for (String item : items) {3
if (item.equals("b")) {4
items.remove(item);5
}6
}๐ The bug is on line 4