Enumerated Collection enumeration()

With legacy classes (JDK 1.0 DS) we use Enumeration. With collections framework classes we use Iterator or ListIterator. As such, with collection classes it is not possible to use Enumeration. To overcome this, the Collections class comes with enumeration() method. It returns collection class elements as an Enumeration. It is a good example on the …

Enumerated Collection enumeration() Read More »

Java Collections API Methods

A small confusion comes to a novice at this juncture between collection and collections. Both are very different. Collection is an interface and Collections is a class, both from java.util package. Collection is the root interface from which almost all data structures are derived, commonly known as collection framework. Collections class contains many static methods …

Java Collections API Methods Read More »