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 →
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!