What’s the difference between Enumeration and Iterator interfaces ?5
1160 5b5cc7cee4d2b41977751102
Q: What’s the difference between Enumeration and Iterator interfaces ?
- Show Answer
- Workspace
- Discuss
Answer :
Explanation :
Enumeration is twice as fast as compared to an Iterator and uses very less memory. However, the Iterator is much safer compared to Enumeration, because other threads are not able to modify the collection object that is currently traversed by the iterator. Also, Iteratorsallow the caller to remove elements from the underlying collection, something which is not possible with Enumerations.
Similar Questions
Since Nithya and Suganya exchange places, so Rita’s new position is the same as Monika’s earlier position. This position is 17th from the right and 10th from the left. Therefore Number of girls in the row = (16 + 1 + 9) = 26.