+ 6
What is the difference between iterators and listIterators?
Iterators can iterate only in forward direction while listIterators can access in both directions
5 Respostas
+ 4
Iterator works only in forward direction while list iterators can move in both forward and backword direction.
Iterator can be used just for read and remove purpose during loop execution. But list iterator can also be used for replacing element in list with new item as well as adding new element to the list during the loop execution
+ 2
In single Word ITERATOR is used for COLLECTION (All Interface) and ListIterato is used only for LIST interface..
+ 1
iterator is used in place of enumeration in collections
0
Iterator is common for All Intefaces In collection..
And Iterator works only in forward direction while list iterators can move in both forward and backword direction...
....
Iterator is used just for read and remove onjects during loop execution.
..... But list iterator can also be used for replacing element in list with new item as well as adding new element to the list during the code of execution or loop execution..... list Iterator is faster...
0
Iterator Movement Is only Forward Direction,, we cab only Read and REMOVE,, ... ITS common for All collection..
LISTITERATOR only for List Objects,, It is Bidirectional,, We can READ/REMOVE/REPLACE/ADD