SlideShare a Scribd company logo
2
Most read
4
Most read
5
Most read
Collection Framework
concept in Java
Kumar Gaurav
k10gaurav@gmail.com
Need of collection framework?
 Due to limitation of arrays
 Arrays store homogenous data types only and fixed size
 Collections allowed to store heterogeneous data types with growable size
 Collection Framework is set of several classes and interfaces that helps to
achieve this target
9 key interfaces of collection framework
 Collection
 List
 Set
 SortedSet
 NavigableSet
 Queue
 Map
 SortedMap
 NavigbleMap
1- Collection
 Whenever we would like to represent a group of objects as a single entity,
we use Collection for the same
 It is also known as root interface of collections framework but not
completely
 There is no concrete class that implements collection interface directly
 It defines most common methods which are applicable on any collection
object -
2- List
 List is child interface of Collection
 Representing a group of object as a single entity with the condition that -
 Duplicates are allowed
 Insertion order is preserved
 Duplicates identified by index
 Preserving insertion order by index
 Index has very important role
3- Set
 It is child interface of Collection
 Representing a group of object as a single entity with the condition that -
 Duplicates are not allowed
 Insertion order is not preserved
4- SortedSet
 It is child interface of Set
 Representing a group of object as a single entity with the condition that -
 Duplicates are not allowed
 Insertion order is not preserved
 Objects should be stored in some sorted order
5- NavigableSet
 It is child interface of SoretdSet
 It defines several methods for navigation purpose
 TreeSet is the implementation class
6- Queue
 It is the child interface of Collection
 If we want to represent a group of objects prior to processing then we
should go for Queue
 For e.g. suppose we have to send email to 100 email id’s so we have to store it
somewhere and the emails will be delivered in the same order they were saved
Wait a min before next…
 All discussed 6 interfaces Collection, List, Set, SoretdSet, NavigableSet,
Queue meant for representing a group of individual object as a single
entity
 If we want a represent group of objects as key-value pairs then we should
go for Map interface
7- Map
 Map interface is not the child of Collection interface
 If we want to represent a group of objects as key-value pairs then should
go for Map
 Both key and value are objects
 Duplicate key is not allowed, value can be duplicate
8- SortedMap
 It is the child interface of Map
 If we want to represent a group of key value pairs as per some sorting
order then SortedMap is used
9- NavigableMap
 It is the child interface of SoretdMap
 It defines several utility methods for navigation purpose
 TrreeMap is the implementation class
References
 Durgasoft java tutorial http://durgasoft.com/
 Oracle https://docs.oracle.com/javase/7/docs/api/java/util/Collections.html
Thank you!

More Related Content

What's hot (20)

PDF
Collections In Java
Binoj T E
 
PDF
Java Collection framework
ankitgarg_er
 
PPTX
Delegates and events in C#
Dr.Neeraj Kumar Pandey
 
PDF
Java threads
Prabhakaran V M
 
ODP
Java Collections
parag
 
PPTX
Advance Java Topics (J2EE)
slire
 
PPTX
Java string handling
Salman Khan
 
PPTX
java interface and packages
VINOTH R
 
PDF
Java Collections | Collections Framework in Java | Java Tutorial For Beginner...
Edureka!
 
PPSX
Collections - Lists, Sets
Hitesh-Java
 
PPTX
Event Handling in java
Google
 
PPTX
Threads in JAVA
Haldia Institute of Technology
 
PDF
Arrays in Java
Naz Abdalla
 
PPTX
Java swing
Apurbo Datta
 
PPTX
Constructor in java
Pavith Gunasekara
 
PPSX
JDBC: java DataBase connectivity
Tanmoy Barman
 
PPT
sets and maps
Rajkattamuri
 
PDF
07 java collection
Abhishek Khune
 
PDF
Java Linked List Tutorial | Edureka
Edureka!
 
Collections In Java
Binoj T E
 
Java Collection framework
ankitgarg_er
 
Delegates and events in C#
Dr.Neeraj Kumar Pandey
 
Java threads
Prabhakaran V M
 
Java Collections
parag
 
Advance Java Topics (J2EE)
slire
 
Java string handling
Salman Khan
 
java interface and packages
VINOTH R
 
Java Collections | Collections Framework in Java | Java Tutorial For Beginner...
Edureka!
 
Collections - Lists, Sets
Hitesh-Java
 
Event Handling in java
Google
 
Arrays in Java
Naz Abdalla
 
Java swing
Apurbo Datta
 
Constructor in java
Pavith Gunasekara
 
JDBC: java DataBase connectivity
Tanmoy Barman
 
sets and maps
Rajkattamuri
 
07 java collection
Abhishek Khune
 
Java Linked List Tutorial | Edureka
Edureka!
 

Viewers also liked (8)

PDF
Scala Collections : Java 8 on Steroids
François Garillot
 
PPT
Collections in Java
Khasim Cise
 
PPTX
Java collections
Amar Kutwal
 
PPT
java collections
javeed_mhd
 
PDF
Java Collections Framework
guestd8c458
 
PDF
Java Collections API
Alex Miller
 
PDF
05 - Java. Collections Framework и Generics
Roman Brovko
 
PPT
Spring ppt
Mumbai Academisc
 
Scala Collections : Java 8 on Steroids
François Garillot
 
Collections in Java
Khasim Cise
 
Java collections
Amar Kutwal
 
java collections
javeed_mhd
 
Java Collections Framework
guestd8c458
 
Java Collections API
Alex Miller
 
05 - Java. Collections Framework и Generics
Roman Brovko
 
Spring ppt
Mumbai Academisc
 
Ad

Similar to Java collections concept (20)

PPTX
Collections Training
Ramindu Deshapriya
 
PPT
Collections
Rajkattamuri
 
PPT
collections
javeed_mhd
 
PPT
Collections
Manav Prasad
 
PPT
Best core & advanced java classes in mumbai
Vibrant Technologies & Computers
 
PPTX
Slide Dasar Materi Java Collection Framework
Bayu Rimba
 
PPT
JavaCollections.ppt
Irfanhabeeb18
 
PPT
JavaCollections.ppt
boopathirajaraja1
 
PPTX
Advanced Java - UNIT 3.pptx
eyemitra1
 
PPTX
LJ_JAVA_FS_Collection.pptx
Raneez2
 
PPTX
Java collections
anshkhurana7
 
PPT
description of Collections, seaching & Sorting
mdimberu
 
PPT
11000121065_NAITIK CHATTERJEE.ppt
NaitikChatterjee
 
PPTX
22.collections(1)
Sirisha Chillakanti
 
PDF
Collectn framework
charan kumar
 
PDF
Collectn framework copy
charan kumar
 
PPTX
VTUOOPMCA5THMODULECollection OverV .pptx
VeenaNaik23
 
PPTX
mca5thCollection OverViCollection O.pptx
VeenaNaik23
 
PPTX
VTUOOPMCA5THMODULEvCollection OverV.pptx
VeenaNaik23
 
PPTX
VTUOOPMCA5THMODULECollection OverVi.pptx
VeenaNaik23
 
Collections Training
Ramindu Deshapriya
 
Collections
Rajkattamuri
 
collections
javeed_mhd
 
Collections
Manav Prasad
 
Best core & advanced java classes in mumbai
Vibrant Technologies & Computers
 
Slide Dasar Materi Java Collection Framework
Bayu Rimba
 
JavaCollections.ppt
Irfanhabeeb18
 
JavaCollections.ppt
boopathirajaraja1
 
Advanced Java - UNIT 3.pptx
eyemitra1
 
LJ_JAVA_FS_Collection.pptx
Raneez2
 
Java collections
anshkhurana7
 
description of Collections, seaching & Sorting
mdimberu
 
11000121065_NAITIK CHATTERJEE.ppt
NaitikChatterjee
 
22.collections(1)
Sirisha Chillakanti
 
Collectn framework
charan kumar
 
Collectn framework copy
charan kumar
 
VTUOOPMCA5THMODULECollection OverV .pptx
VeenaNaik23
 
mca5thCollection OverViCollection O.pptx
VeenaNaik23
 
VTUOOPMCA5THMODULEvCollection OverV.pptx
VeenaNaik23
 
VTUOOPMCA5THMODULECollection OverVi.pptx
VeenaNaik23
 
Ad

More from kumar gaurav (20)

PPTX
Need Of Enterprise Integration
kumar gaurav
 
PPTX
Mulesoft file connector
kumar gaurav
 
PPTX
Mulesoft http connector
kumar gaurav
 
PDF
Reason to connect with Mulesoft
kumar gaurav
 
PPTX
Mulesoft idempotent Message Filter
kumar gaurav
 
PPTX
Mulesoft Using Groovy Component
kumar gaurav
 
PPTX
Mulesoft vm transport reference
kumar gaurav
 
PPTX
Mulesoft Calling Flow of Other Applications
kumar gaurav
 
PPTX
Mulesoft Solutions for Mobile
kumar gaurav
 
PPTX
Mulesoft Solutions for SOA
kumar gaurav
 
PPTX
Mulesoft Solutions for IoT
kumar gaurav
 
PPTX
Mulesoft Anypoint platform for APIs
kumar gaurav
 
PPTX
Oracle Managed Files Transfer- Key based authentication
kumar gaurav
 
PPTX
Struggle that counts
kumar gaurav
 
PDF
Team Work
kumar gaurav
 
PPTX
MySQL index optimization techniques
kumar gaurav
 
PPTX
Security guidelines for web development
kumar gaurav
 
PPT
Java web services
kumar gaurav
 
PPT
Oracle web center suit
kumar gaurav
 
PPT
jQuery Beginner
kumar gaurav
 
Need Of Enterprise Integration
kumar gaurav
 
Mulesoft file connector
kumar gaurav
 
Mulesoft http connector
kumar gaurav
 
Reason to connect with Mulesoft
kumar gaurav
 
Mulesoft idempotent Message Filter
kumar gaurav
 
Mulesoft Using Groovy Component
kumar gaurav
 
Mulesoft vm transport reference
kumar gaurav
 
Mulesoft Calling Flow of Other Applications
kumar gaurav
 
Mulesoft Solutions for Mobile
kumar gaurav
 
Mulesoft Solutions for SOA
kumar gaurav
 
Mulesoft Solutions for IoT
kumar gaurav
 
Mulesoft Anypoint platform for APIs
kumar gaurav
 
Oracle Managed Files Transfer- Key based authentication
kumar gaurav
 
Struggle that counts
kumar gaurav
 
Team Work
kumar gaurav
 
MySQL index optimization techniques
kumar gaurav
 
Security guidelines for web development
kumar gaurav
 
Java web services
kumar gaurav
 
Oracle web center suit
kumar gaurav
 
jQuery Beginner
kumar gaurav
 

Recently uploaded (20)

PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
NLJUG Speaker academy 2025 - first session
Bert Jan Schrijver
 
PDF
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
DOCX
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
PDF
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
PDF
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PDF
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
PDF
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PDF
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
DOCX
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
PPTX
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
PDF
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PPTX
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
 
PPTX
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
NLJUG Speaker academy 2025 - first session
Bert Jan Schrijver
 
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
 
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 

Java collections concept

  • 2. Need of collection framework?  Due to limitation of arrays  Arrays store homogenous data types only and fixed size  Collections allowed to store heterogeneous data types with growable size  Collection Framework is set of several classes and interfaces that helps to achieve this target
  • 3. 9 key interfaces of collection framework  Collection  List  Set  SortedSet  NavigableSet  Queue  Map  SortedMap  NavigbleMap
  • 4. 1- Collection  Whenever we would like to represent a group of objects as a single entity, we use Collection for the same  It is also known as root interface of collections framework but not completely  There is no concrete class that implements collection interface directly  It defines most common methods which are applicable on any collection object -
  • 5. 2- List  List is child interface of Collection  Representing a group of object as a single entity with the condition that -  Duplicates are allowed  Insertion order is preserved  Duplicates identified by index  Preserving insertion order by index  Index has very important role
  • 6. 3- Set  It is child interface of Collection  Representing a group of object as a single entity with the condition that -  Duplicates are not allowed  Insertion order is not preserved
  • 7. 4- SortedSet  It is child interface of Set  Representing a group of object as a single entity with the condition that -  Duplicates are not allowed  Insertion order is not preserved  Objects should be stored in some sorted order
  • 8. 5- NavigableSet  It is child interface of SoretdSet  It defines several methods for navigation purpose  TreeSet is the implementation class
  • 9. 6- Queue  It is the child interface of Collection  If we want to represent a group of objects prior to processing then we should go for Queue  For e.g. suppose we have to send email to 100 email id’s so we have to store it somewhere and the emails will be delivered in the same order they were saved
  • 10. Wait a min before next…  All discussed 6 interfaces Collection, List, Set, SoretdSet, NavigableSet, Queue meant for representing a group of individual object as a single entity  If we want a represent group of objects as key-value pairs then we should go for Map interface
  • 11. 7- Map  Map interface is not the child of Collection interface  If we want to represent a group of objects as key-value pairs then should go for Map  Both key and value are objects  Duplicate key is not allowed, value can be duplicate
  • 12. 8- SortedMap  It is the child interface of Map  If we want to represent a group of key value pairs as per some sorting order then SortedMap is used
  • 13. 9- NavigableMap  It is the child interface of SoretdMap  It defines several utility methods for navigation purpose  TrreeMap is the implementation class
  • 14. References  Durgasoft java tutorial http://durgasoft.com/  Oracle https://docs.oracle.com/javase/7/docs/api/java/util/Collections.html