This section contains the Introduction to Collection in java.
Introduction to Collection
Collection was added to Java with J2SE 1.2 release. Collection framework is provided in 'java.util.package'.
All collections framework contains the following three parts :
Interfaces : Interfaces allow collections to be manipulated independently of the details of their representation.
Implementations i.e. Classes: These are the concrete implementations of the collection interfaces. Also, they are reusable data structures.
Algorithms: These are the methods that perform useful computations, such as searching and sorting, on objects that implement collection interfaces. The same method can be used on many different implementations of the appropriate collection interface.
The main benefits of Collection Framework are :
1. The implementations for the fundamental collections (dynamic arrays, linked lists, trees, and hash tables) are highly efficient.
2. It allows different types of collections to work in a similar manner and with a high degree of interoperability.
3. It allows the integration of standard arrays into the Collection Framework.