advantages of iterator in java code example
Example: advantages of iterator in java
You can remove objects using an iterator, but you can't do it with a foreach loop
Sometimes is useful to pass an iterator to a function (specially recursive ones)
You can remove objects using an iterator, but you can't do it with a foreach loop
Sometimes is useful to pass an iterator to a function (specially recursive ones)