Difference between Enumeration Iterator and ListIterator in Java | Java Collection | Java Tutorial

preview_player
Показать описание
Please use the following link to install the Katalon Studio:

Enumeration:

It is applicable for only legacy classes.
Works only forward direction.
Will get elements by elements() method
Can perform only Read operation.
2 methods available to perform operations.
It introduced in v1.0

Iterator:

Applicable for any Collection object.
Works only forward direction.
Will get elements by iterator() method.
Can perform Read and Remove operations.
3 methods available to perform operations.
It introduced in v1.2

ListIterator:
Applicable for only List objects.
Works in both the directions (i.e., forward and backward).
Will get elements by listIterator() method.
Can perform Read, Replace, Add and Remove operations.
9 methods available to perform operations.
It introduced in v1.2

Рекомендации по теме
welcome to shbcf.ru