Collections
A collection is simply an object that groups multiple elements into a single unit. Collections are used to store, retrieve, manipulate, and communicate aggregate data. Typically, they represent data items that form a natural group, such as a poker hand (a collection of cards), a mail folder (a collection of letters), or a telephone directory (a mapping of names to phone numbers).
What is a Collections framework?
A collections framework is a unified architecture for representing and manipulating groups of data as a single unit collection. All collections frameworks consist of the following parts:
- Interfaces: The Java collections framework interface provides the abstract data type to represent a collection. The root interface of Collections framework hierarchy is
java.util.Collection. Some other important interfaces arejava.util.Listandjava.util.Set. All the collections framework interfaces are present in thejava.utilpackage. - Implementations: These are the core implementations...