Example & Tutorial understanding programming in easy ways.

if accessing through iterator is slow then why do we need it and when to use it?

We can use for loop but for loop does not allow the update  in the array(add or remove operation) inside the loop whereas Iterator provide methods.
Iterator can be used where there is no information about data type of objects

Read More →