advantages of iterator in java

Solutions on MaxInterview for advantages of iterator in java by the best coders in the world

showing results for - "advantages of iterator in java"
Niklas
21 May 2018
1You can remove objects using an iterator, but you can't do it with a foreach loop
2Sometimes is useful to pass an iterator to a function (specially recursive ones)