Java Collections API

The Java Collections Framework (JCF) is a set of interfaces and classes that provide efficient ways to store, manipulate, and process data in Java. It is part of the java.util package and provides implementations for lists, sets, maps, queues, and more.


Collection Framework Hierarchy:

Java Collections API is structured as follows:

Collection Interface (Root Interface)

🔹 List → Ordered collection (e.g., ArrayList, LinkedList)

🔹 Set → Unique elements only (e.g., HashSet, TreeSet)

🔹 Queue → FIFO (First-In-First-Out) (e.g., PriorityQueue, LinkedList)

Map Interface (Separate from Collection)

🔹 Map → Key-Value pairs (e.g., HashMap, TreeMap, LinkedHashMap)


Key Interfaces & Implementations:

Interface

Features

Implementations

List

Ordered, allows duplicates

ArrayList, LinkedList, Vector

Set

No duplicates

HashSet, LinkedHashSet, TreeSet

Queue

First In First Out processing

PriorityQueue, Deque

Map

Key-Value storage

HashMap, TreeMap, LinkedHashMap, Hashtable


Whereisstuff is simple learing platform for beginer to advance level to improve there skills in technologies.we will provide all material free of cost.you can write a code in runkit workspace and we provide some extrac features also, you agree to have read and accepted our terms of use, cookie and privacy policy.
© Copyright 2024 www.whereisstuff.com. All rights reserved. Developed by whereisstuff Tech.