Session 13 |
Introduction to Java Collections Framework
A data structure is a collection of data organized in some fashion. In object-oriented thinking, a data structure is known as a container. A container is an object that groups multiple elements into a single unit. Typically, a container represents data items that form a natural group, such as a mail folder (a collection of letters), or a telephone directory (a mapping of names to phone numbers).
Java Collections Framework is a collection of interfaces and classes which helps in storing and processing the data efficiently. The following diagram shows a brief overview of Java Collections Framework with its commonly-used interfaces and classes:
In the diagram, it is clearly seen that Java Collections Framework supports two types of containers (two separate branches):
- a collection - for storing a collection of elements;
- a map - for storing key/value pairs.
In this session (and course), we will focus only on the following interfaces: List, Queue, Deque, Set and Map.
Session 13 |