Java collections
https://www.geeksforgeeks.org/collections-in-java-2/?ref=lbp
Collection
Any group of individual objects which are represented as a single unit
Collection Framework
defined in JDK 1.2
holds all the collection classes and interface
! The Collection interface (java.util.Collection ) and Map interface (java.util.Map ) are the two main โrootโ interfaces of Java collection classes.
Framework
a set of classes and interfaces which provide a ready-made architecture
Advantages of the Collection Framework
Consistent API
Reduces programming effort
Increase program speed and quality
Hierarchy of the Collection Framework

Class
user-defined blueprint or prototype from which objects are created
represents the set of properties or methods that are common to all objects of one type
Interface
Like a class, an interface can have methods and variables, but the methods declared in an interface are by default abstract (only method signature, no body)
pecify what a class must do and not how
blueprint of the class
Methods of the Collection Interface
This interface contains various methods which can be directly used by all the collections which implement this interface.
Interfaces that extend the Collections Interface
The collection framework contains multiple interfaces where every interface is used to store a specific type of data.
The following are the interfaces present in the framework.
Iterable Interface
root interface for the entire collection framework
all the interfaces and classes implement this interface
the main functionality of this interface is to provide an iterator for the collections
// this interface contains only one abstract method which is the iterator Iterator iterator();
Collection Interface
List Interface
ArrayList
LinkedList
Vector
Stack
Queue Interface
Priority Queue
Deque Interface
ArrayDeque
Set Interface
HashSet
LinkedHashSet
Sorted Set Interface
TreeSet
Map Interface
HashMap
What You Should Learn in Java Collections?
reference
Last updated