1. What is Collection Framework?

The Java Collection Framework is a set of interfaces, classes, and methods provided by Java to store and manipulate groups of objects.

Instead of creating our own data structures every time, Java provides ready-made structures such as:

Example:

List<String> names = new ArrayList<>();

names.add("Anirban");
names.add("Rahul");
names.add("Amit");

Here, ArrayList manages the storage of multiple String objects for us.


2. Why Collections?

Arrays have limitations.

An array has a fixed size:

String[] names = new String[3];

You cannot directly increase its size.