O'Reilly logo

Special Edition Using Java 2 Standard Edition by Geoff Friesen, Chuck Cavaness, Brian Keeton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

General-Purpose Implementations

Fortunately, Sun did not stop with the definition of interfaces when the collections framework was established. The Java API includes seven concrete implementations of the various interfaces found within the framework. These general-purpose implementations will typically suffice when you need a particular collection or map class to support a program. Even if you find a need for a more specialized implementation, you will likely find it easier to use one of the classes in this hierarchy as a starting point rather than implementing one of the interfaces from scratch.

Troubleshooting Tip

If you experience runtime exceptions when using collection classes other than the general-purpose implementations, see "UnsupportedOperationException, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required