Abstract

In this chapter, we will look at some classes from the Java Collections Framework that can be used to contain collections of other objects. This framework makes extensive use of both inheritance and interfaces to provide both reuse and consistency across many different types of collection. The components of the framework include familiar data structures such as arrays, lists, maps, and queues, as well as related algorithmic operations such as searching and sorting. The collections framework starts from the idea that every type of container is either a Collection or a Map. Both Collection and Map are interfaces that provide a common set of method signatures that all implementing classes should support. A Collection is something that contains elements, whereas a Map defines a mapping between keys and objects.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call