0% found this document useful (0 votes)
3 views1 page

Java Collections Handbook

The Java Collections Framework provides a structure for storing and manipulating groups of objects through various interfaces like List, Set, Queue, Deque, and Map. Each interface has common implementations and key methods that facilitate operations such as adding, removing, and accessing elements. This handbook outlines the essential functionalities and methods associated with each interface.

Uploaded by

saiganesh26167
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views1 page

Java Collections Handbook

The Java Collections Framework provides a structure for storing and manipulating groups of objects through various interfaces like List, Set, Queue, Deque, and Map. Each interface has common implementations and key methods that facilitate operations such as adding, removing, and accessing elements. This handbook outlines the essential functionalities and methods associated with each interface.

Uploaded by

saiganesh26167
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Java Collections Handbook

Overview

The Java Collections Framework provides architecture to store and manipulate a group of objects. It includes interfaces
such as List, Set, Queue, and Map, and their various implementations.

List Interface

Common Implementations: ArrayList, LinkedList, Vector, Stack


Key Methods:
- add(E e), add(int index, E element), addAll(...)
- get(int index), set(int index, E element)
- remove(int index), remove(Object o)
- indexOf(), lastIndexOf(), subList(), toArray()
- isEmpty(), size(), clear(), contains()

Set Interface

Common Implementations: HashSet, LinkedHashSet, TreeSet


Key Methods:
- add(), remove(), contains(), clear(), size(), isEmpty()
- retainAll(), removeAll(), containsAll()

Queue Interface

Common Implementations: LinkedList, PriorityQueue


Key Methods:
- add(), offer(), remove(), poll(), peek(), element()

Deque Interface

Common Implementations: ArrayDeque, LinkedList


Key Methods:
- addFirst(), addLast(), removeFirst(), removeLast()
- peekFirst(), peekLast(), offerFirst(), offerLast()
- pollFirst(), pollLast(), push(), pop()

Map Interface

Common Implementations: HashMap, TreeMap, LinkedHashMap


Key Methods:
- put(), get(), remove(), putIfAbsent(), replace()
- containsKey(), containsValue(), clear(), isEmpty(), size()
- keySet(), values(), entrySet()

You might also like