top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

what is the difference between iterator and list iterator ?

+1 vote
210 views
what is the difference between iterator and list iterator ?
posted Jan 7, 2015 by Roshni

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

Iterator:

Only forward movement is allowed.

While traversing we can't obtain the index at any point.

We can only check the availability of the next element

We can't modify element while traversing.

List iterator:

It can move backwards as well as forward while reading the elements.

We can obtain the index at any point while traversing

We can check availability of previous and next element.

Elements can be modified while traversing.

answer Jan 8, 2015 by Karthick.c
...