A collection, also known as a container, is an object that contains a group of objects.
Each object in a collection is called an element of the collection.
The Collections Framework consists of three main components:
An interface represents a specific type of collection in the framework.
There is one interface defined for every type of collection in the framework.
The Collections Framework provides implementations of collection interfaces.
The following code shows how to use the implementation class ArrayList to create a list.
Create an instance of the ArrayList class storing the reference in a variable of the List interface
List<String> names = new ArrayList<>();
To perform different actions on a collection, such as
Use algorithm classes on your collections.