An enumeration is an object that generates elements one at a time, used for passing through a collection, usually of unknown size. The traversing of elements can only be done once per creation.
An enumeration is an object that generates elements one at a time, used for passing through a collection, usually of unknown size.
The traversing of elements can only be done once per creation.
Enumeration’s have two options:
An enumeration is an object that generates elements one at a time, used for passing through a collection, usually of unknown size.
The traversing of elements can only be done once per creation.
Enumeration’s have two options:
- nextElement() which returns the next object in the collection
- hasMoreElements() which returns true, until the last object has been returned by nextElement()
Posted in: