Enumeration | Iterator |
---|---|
Enumeration doesn't have a remove() method | Iterator has a remove() method |
Enumeration acts as Read-only interface, because it has the methods only to traverse and fetch the objects | Can be abstract, final, native, static, or synchronized |
Note: So Enumeration is used whenever we want to make Collection objects as Read-only.
No comments:
Post a Comment