SlideShare a Scribd company logo
1 of 15
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

What's hot (20)

Collections In Java
Collections In JavaCollections In Java
Collections In Java
 
Java string handling
Java string handlingJava string handling
Java string handling
 
Collections and its types in C# (with examples)
Collections and its types in C# (with examples)Collections and its types in C# (with examples)
Collections and its types in C# (with examples)
 
Collections framework in java
Collections framework in javaCollections framework in java
Collections framework in java
 
Generics
GenericsGenerics
Generics
 
Collections Api - Java
Collections Api - JavaCollections Api - Java
Collections Api - Java
 
07 java collection
07 java collection07 java collection
07 java collection
 
Java - Collections framework
Java - Collections frameworkJava - Collections framework
Java - Collections framework
 
Java collections notes
Java collections notesJava collections notes
Java collections notes
 
5 collection framework
5 collection framework5 collection framework
5 collection framework
 
Collections in Java Notes
Collections in Java NotesCollections in Java Notes
Collections in Java Notes
 
Files in java
Files in javaFiles in java
Files in java
 
Core java complete ppt(note)
Core java  complete  ppt(note)Core java  complete  ppt(note)
Core java complete ppt(note)
 
Multithreading in java
Multithreading in javaMultithreading in java
Multithreading in java
 
Java collections
Java collectionsJava collections
Java collections
 
Java Exception handling
Java Exception handlingJava Exception handling
Java Exception handling
 
java interface and packages
java interface and packagesjava interface and packages
java interface and packages
 
Java 8 Streams
Java 8 StreamsJava 8 Streams
Java 8 Streams
 
Java static keyword
Java static keywordJava static keyword
Java static keyword
 
Oops concepts || Object Oriented Programming Concepts in Java
Oops concepts || Object Oriented Programming Concepts in JavaOops concepts || Object Oriented Programming Concepts in Java
Oops concepts || Object Oriented Programming Concepts in Java
 

Viewers also liked

Scala Collections : Java 8 on Steroids
Scala Collections : Java 8 on SteroidsScala Collections : Java 8 on Steroids
Scala Collections : Java 8 on SteroidsFrançois Garillot
 
Collections in Java
Collections in JavaCollections in Java
Collections in JavaKhasim Cise
 
Java collections
Java collectionsJava collections
Java collectionsAmar Kutwal
 
java collections
java collectionsjava collections
java collectionsjaveed_mhd
 
Java Collections Framework
Java  Collections  FrameworkJava  Collections  Framework
Java Collections Frameworkguestd8c458
 
Java Collections API
Java Collections APIJava Collections API
Java Collections APIAlex Miller
 
05 - Java. Collections Framework и Generics
05 - Java. Collections Framework и Generics05 - Java. Collections Framework и Generics
05 - Java. Collections Framework и GenericsRoman Brovko
 

Viewers also liked (8)

Scala Collections : Java 8 on Steroids
Scala Collections : Java 8 on SteroidsScala Collections : Java 8 on Steroids
Scala Collections : Java 8 on Steroids
 
Collections in Java
Collections in JavaCollections in Java
Collections in Java
 
Java collections
Java collectionsJava collections
Java collections
 
java collections
java collectionsjava collections
java collections
 
Java Collections Framework
Java  Collections  FrameworkJava  Collections  Framework
Java Collections Framework
 
Java Collections API
Java Collections APIJava Collections API
Java Collections API
 
05 - Java. Collections Framework и Generics
05 - Java. Collections Framework и Generics05 - Java. Collections Framework и Generics
05 - Java. Collections Framework и Generics
 
Spring ppt
Spring pptSpring ppt
Spring ppt
 

Similar to Java Collection Framework Concept Explained

Similar to Java Collection Framework Concept Explained (20)

Advanced Java - UNIT 3.pptx
Advanced Java - UNIT 3.pptxAdvanced Java - UNIT 3.pptx
Advanced Java - UNIT 3.pptx
 
Core & advanced java classes in mumbai
Core & advanced java classes in mumbaiCore & advanced java classes in mumbai
Core & advanced java classes in mumbai
 
unit 2.pptx
unit 2.pptxunit 2.pptx
unit 2.pptx
 
22.collections(1)
22.collections(1)22.collections(1)
22.collections(1)
 
Java collections
Java collectionsJava collections
Java collections
 
Collection framework (completenotes) zeeshan
Collection framework (completenotes) zeeshanCollection framework (completenotes) zeeshan
Collection framework (completenotes) zeeshan
 
Data structure lecture 2 (pdf)
Data structure lecture 2 (pdf)Data structure lecture 2 (pdf)
Data structure lecture 2 (pdf)
 
Java Unit 2 (Part 2)
Java Unit 2 (Part 2)Java Unit 2 (Part 2)
Java Unit 2 (Part 2)
 
Java Collections
Java CollectionsJava Collections
Java Collections
 
Data structures in c#
Data structures in c#Data structures in c#
Data structures in c#
 
Collections framework
Collections frameworkCollections framework
Collections framework
 
Ds
DsDs
Ds
 
List interface in collections framework
List interface in collections frameworkList interface in collections framework
List interface in collections framework
 
Data structure Assignment Help
Data structure Assignment HelpData structure Assignment Help
Data structure Assignment Help
 
Collection framework
Collection frameworkCollection framework
Collection framework
 
collection framework.pptx
collection framework.pptxcollection framework.pptx
collection framework.pptx
 
Data structures
Data structuresData structures
Data structures
 
Collections Java e Google Collections
Collections Java e Google CollectionsCollections Java e Google Collections
Collections Java e Google Collections
 
Java - Collections
Java - CollectionsJava - Collections
Java - Collections
 
Array
ArrayArray
Array
 

More from kumar gaurav

Need Of Enterprise Integration
Need Of Enterprise IntegrationNeed Of Enterprise Integration
Need Of Enterprise Integrationkumar gaurav
 
Mulesoft file connector
Mulesoft file connectorMulesoft file connector
Mulesoft file connectorkumar gaurav
 
Mulesoft http connector
Mulesoft http connectorMulesoft http connector
Mulesoft http connectorkumar gaurav
 
Reason to connect with Mulesoft
Reason to connect with MulesoftReason to connect with Mulesoft
Reason to connect with Mulesoftkumar gaurav
 
Mulesoft idempotent Message Filter
Mulesoft idempotent Message FilterMulesoft idempotent Message Filter
Mulesoft idempotent Message Filterkumar gaurav
 
Mulesoft Using Groovy Component
Mulesoft Using Groovy ComponentMulesoft Using Groovy Component
Mulesoft Using Groovy Componentkumar gaurav
 
Mulesoft vm transport reference
Mulesoft vm transport referenceMulesoft vm transport reference
Mulesoft vm transport referencekumar gaurav
 
Mulesoft Calling Flow of Other Applications
Mulesoft Calling Flow of Other ApplicationsMulesoft Calling Flow of Other Applications
Mulesoft Calling Flow of Other Applicationskumar gaurav
 
Mulesoft Solutions for Mobile
Mulesoft Solutions for MobileMulesoft Solutions for Mobile
Mulesoft Solutions for Mobilekumar gaurav
 
Mulesoft Solutions for SOA
Mulesoft Solutions for SOAMulesoft Solutions for SOA
Mulesoft Solutions for SOAkumar gaurav
 
Mulesoft Solutions for IoT
Mulesoft Solutions for IoTMulesoft Solutions for IoT
Mulesoft Solutions for IoTkumar gaurav
 
Mulesoft Anypoint platform for APIs
Mulesoft Anypoint platform for APIsMulesoft Anypoint platform for APIs
Mulesoft Anypoint platform for APIskumar gaurav
 
Oracle Managed Files Transfer- Key based authentication
Oracle Managed Files Transfer- Key based authenticationOracle Managed Files Transfer- Key based authentication
Oracle Managed Files Transfer- Key based authenticationkumar gaurav
 
Struggle that counts
Struggle that countsStruggle that counts
Struggle that countskumar gaurav
 
MySQL index optimization techniques
MySQL index optimization techniquesMySQL index optimization techniques
MySQL index optimization techniqueskumar gaurav
 
Security guidelines for web development
Security guidelines for web developmentSecurity guidelines for web development
Security guidelines for web developmentkumar gaurav
 
Oracle web center suit
Oracle web center suitOracle web center suit
Oracle web center suitkumar gaurav
 

More from kumar gaurav (20)

Need Of Enterprise Integration
Need Of Enterprise IntegrationNeed Of Enterprise Integration
Need Of Enterprise Integration
 
Mulesoft file connector
Mulesoft file connectorMulesoft file connector
Mulesoft file connector
 
Mulesoft http connector
Mulesoft http connectorMulesoft http connector
Mulesoft http connector
 
Reason to connect with Mulesoft
Reason to connect with MulesoftReason to connect with Mulesoft
Reason to connect with Mulesoft
 
Mulesoft idempotent Message Filter
Mulesoft idempotent Message FilterMulesoft idempotent Message Filter
Mulesoft idempotent Message Filter
 
Mulesoft Using Groovy Component
Mulesoft Using Groovy ComponentMulesoft Using Groovy Component
Mulesoft Using Groovy Component
 
Mulesoft vm transport reference
Mulesoft vm transport referenceMulesoft vm transport reference
Mulesoft vm transport reference
 
Mulesoft Calling Flow of Other Applications
Mulesoft Calling Flow of Other ApplicationsMulesoft Calling Flow of Other Applications
Mulesoft Calling Flow of Other Applications
 
Mulesoft Solutions for Mobile
Mulesoft Solutions for MobileMulesoft Solutions for Mobile
Mulesoft Solutions for Mobile
 
Mulesoft Solutions for SOA
Mulesoft Solutions for SOAMulesoft Solutions for SOA
Mulesoft Solutions for SOA
 
Mulesoft Solutions for IoT
Mulesoft Solutions for IoTMulesoft Solutions for IoT
Mulesoft Solutions for IoT
 
Mulesoft Anypoint platform for APIs
Mulesoft Anypoint platform for APIsMulesoft Anypoint platform for APIs
Mulesoft Anypoint platform for APIs
 
Oracle Managed Files Transfer- Key based authentication
Oracle Managed Files Transfer- Key based authenticationOracle Managed Files Transfer- Key based authentication
Oracle Managed Files Transfer- Key based authentication
 
Struggle that counts
Struggle that countsStruggle that counts
Struggle that counts
 
Team Work
Team WorkTeam Work
Team Work
 
MySQL index optimization techniques
MySQL index optimization techniquesMySQL index optimization techniques
MySQL index optimization techniques
 
Security guidelines for web development
Security guidelines for web developmentSecurity guidelines for web development
Security guidelines for web development
 
Java web services
Java web servicesJava web services
Java web services
 
Oracle web center suit
Oracle web center suitOracle web center suit
Oracle web center suit
 
jQuery Beginner
jQuery BeginnerjQuery Beginner
jQuery Beginner
 

Recently uploaded

Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 

Recently uploaded (20)

Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 

Java Collection Framework Concept Explained

  • 1. Collection Framework concept in Java Kumar Gaurav k10gaurav@gmail.com
  • 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