Main differences between Internal and External Iterator are as follows:
- An Internal Iterator controls the iteration itself. In an External Iterator collection controls the iteration.
- Internal Iterator can iterate elements in individually as well as in
- Bulk (like forEach). External iterator iterates element one by one.
- Internal Iterator does not have to iterate elements only sequentially. External Iterator always iterates sequentially.
- Internal Iterator supports declarative programming style that goes well with functional programming. External Iterator follows imperative style OOPS programming.
- Some people consider Internal Iterator code more readable than that of External Iterator.