There are two types of iterators in Java: fail-safe and fail-fast.
What does this mean, and is the difference between them?
They are rather fail-fast and weakly-consistent types:
Iterators from java.util package throw ConcurrentModificationException if collection was modified by collection's methods (add / remove) while iterating
Iterators from java.util.concurrent package typically iterate over a snapshot and allow concurrent modifications but may not reflect collection updates after the iterator was created.