Java Complete Collection Framework
Java Complete Collection Framework
com/in/soumyadip-chowdhury/
youtube.com/println
@s_oumyadip
INTRODUCTION
Java's Collection
framework provides a way to store
and manipulate groups of objects. Java Collections can
be used for searching, sorting, inserting, manipulating,
and deleting data.
/soumyadip-chowdhury
Hierarchy of Collection
Framework
/soumyadip-chowdhury
List Interface
The List interface is a child interface of the Collection
interface. We cannot store an ordered collection of
objects in a list-type data structure. Values can be
duplicated.
Arraylist
The list is implemented by the ArrayList class. It uses a
dynamic array to store the duplicate element of
different data types.
/soumyadip-chowdhury
ARRAYLIST Snippet
/soumyadip-chowdhury
LinkedList
The LinkedList class implements the Collection
interface. Internally, the elements are stored in a
doubly linked list. Duplicate elements can be stored.
/soumyadip-chowdhury
LinkedList Snippet
Vector
/soumyadip-chowdhury
Vector Snippet
/soumyadip-chowdhury
Stack
A subtype of the vector is the stack. It uses the
stack data structure, or last-in, first-out.
/soumyadip-chowdhury
Stack Snippet
Queue
The order of first-in, first-out is maintained through
the queue interface. It can be characterized as an
ordered list used to store pieces that are scheduled to
undergo processing.
/soumyadip-chowdhury
Queue Snippet
/soumyadip-chowdhury
PriorityQueue
/soumyadip-chowdhury
Priority Queue Snippet
/soumyadip-chowdhury
Deque Interface
/soumyadip-chowdhury
ArrayDeque
/soumyadip-chowdhury
ArrayDeque Snippet
/soumyadip-chowdhury
Set Interface
/soumyadip-chowdhury
Set Snippet
/soumyadip-chowdhury
HashSet
/soumyadip-chowdhury
Set Snippet
/soumyadip-chowdhury
LinkedHashSet
/soumyadip-chowdhury
LinkedHashSet Snippet
SortedSet Interface
/soumyadip-chowdhury
TreeSet Interface
which uses a tree for storage,
The Set interface,
is implemented by the Java TreeSet class.
/soumyadip-chowdhury
TreeSet Snippet
/soumyadip-chowdhury
And for amazing stuff you can follow me
Soumyadip Chowdhury
soumyadip-chowdhury
@s_oumyadip
@println
References:
https://www.javatpoint.com/collections-in-java