it's used to manage algorithms, relationships and responsibilities between objects.
we can provide different kind of iterators based on our requirements. Iterator pattern hides the actual implementation of traversal through the collection and client programs just use iterator methods.