Understand Java fail-fast and fail-safe iterator behavior so mutation and traversal expectations stay realistic.
Iterator design is not only about order. It is also about mutation semantics.
Many Java collection iterators are fail-fast. If the underlying collection changes unexpectedly during iteration, the iterator may throw ConcurrentModificationException.
That is a debugging aid, not a thread-safety guarantee.
Some iterator designs work over copies or concurrent views and continue despite structural changes. That changes performance and visibility semantics.
If you design a custom iterator, document mutation behavior clearly. “What happens if the collection changes during traversal?” is part of the iterator contract.