![]() |
JAVA EXAMPLE PROGRAMS |
Publish Your Article Here
|
|
|
Java2Novice - YouTube Channel
Knowledge Centre
Difference between Enumeration and Iterator
The functionality of Enumeration and the Iterator are same. You can get remove()
from Iterator to remove an element, while while Enumeration does not have remove()
method. Using Enumeration you can only traverse and fetch the objects, where as using
Iterator we can also add and remove the objects. So Iterator can be useful if you want
to manipulate the list and Enumeration is for read-only access.
Famous Quotations
Before you go and criticize the younger generation, just remember who raised them.
-- Unknown Author
Few Random Java Examples
|
Reference: Java™ Platform Standard Ed. 7 - API Specification | Java™ Platform Standard Ed. 8 - API Specification | Java is registered trademark of Oracle. |
Privacy Policy | Copyright © 2022 by Nataraja Gootooru. All Rights Reserved. |