Java Data Structures

The data structures provided by the java.util package are very powerful and perform a wide range of functions. These data structures consist of the Iterator interface, the Map interface, and classes such as the following:

  • BitSet

  • Vector

  • Stack

  • Hashtable

Each of these data structures provides a way to store and retrieve information in a well-defined manner. The Iterator interface isn't itself a data structure, but it defines a means to retrieve successive elements from a data structure. For example, Iterator defines a method called next() that gets the next element in a data structure that contains multiple elements.

Note

Iterator is an expanded and improved version of the Enumeration interface that was added in Java 2. Although ...

Get Sams Teach Yourself Java 2 in 21 Days, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.