How can you safely modify a collection while iterating through it?
Using Iterator.remove()
Using List.remove(Object) inside a loop
Using collection.stream().forEach()
Using for-each loop
This question is part of this quiz :