Iterator pattern: It is a common pattern in which the contents of a collection are iterated above in order. The Iterator pattern frees a client of data from requiring details of how the data is stored. This pattern is maintained by the Iterator and ListIterator interfaces.