What is a Collection Framework in Java?

What is a Collection Framework in Java?

What is a Collection Framework in Java?

What is a Collection Framework in Java?

If we want to represent a group of an individual object as a single entity then we should go for collection. It contains several classes and interfaces which can be used to represent a group of an individual object as a single entity. You can perform following activity using Java collection framework,

  • Add objects to the collection.
  • Remove objects from the collection.
  • Search for an object in the collection.
  • Retrieve/get an object from the collection.
  • Iterate through the collection for business-specific functionality.

We have 9 key interfaces of collection framework for understanding in a proper way..

  1. Collection
  2. List
  3. Set
  4. SortedSet
  5. NavigableSet
  6. Queue
  7. Map
  8. SortedMap
  9. NavigableMap

Leave a Reply

Your email address will not be published. Required fields are marked *

*