Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 7

Collection

Framework in
Java
Collection Framework
• Introduction
• Java Collection Framework is a set of classes and interfaces that provide a
well-structured way to handle and manipulate collections of objects.
• It simplifies the process of storing, searching, and manipulating data.
• Framework Hierarchy
• The Collection Framework has a hierarchical structure with the
"Collection" interface at the top.
• Subinterfaces like List, Set, and Queue extend from the Collection
interface.
• Core Interface
• The "Collection" interface is at the heart of theframework.
• It defines the most basic methods that all collections will have, like add,
remove, and size.
List Interface

• The "List" interface in Java extends the


"Collection" interface, introducing an ordered
collection of elements.
• Elements in a List can be accessed by their index,
offering a sequential order.
Array List
• "ArrayList" is a dynamic array implementation of the List interface.
• It automatically resizes itself as elements are added or removed.
● Other than that we can also use collection framework for-

- LinkedList
- Iterator
- List methods
Hierarchy of Collection
Framework

You might also like