Collection is the core framework developed in Java using design Patterns.
This framework provides the data structure architecture to store, retrieve and process the group of objects/elements.
Java Collections has so many interfaces like List, Map, Set, Queue, Vector.
List – Ordered collection of Objects, (Maintain Insertion Order)
Map – Collection of Key Value Pair Objects, which is unordered, allow duplicate values, however not allow duplicate keys.
Set – Collection of Key value Pair Objects, which is unordered does not allows duplicate Objects.
Queue – Maintain the basic data structure queue, FIFO (First In First Out)
These frameworks provide easy implementation on following features.,
- Insert/Delete/Update on list/group of element
Collection Interface, has abstract methods, like add(), remove() which needs to be implemented in their own algorithmic way.
- Search/Retrieve in the list/group of elements.,
Collection Interface has abstract methods like contains(), indexOf() which needs to be implemented in their own algorithmic way.