Java Collections Framework Interview Questions & Answers — Cracked Java
Cracked Java console
0
S
Modules/Java Collections Framework
// MODULE · 15 TOPICS · 89 QUESTIONS

Java Collections Framework

Lists, Sets, Maps, Queues, the equals/hashCode contract, concurrent collections, and the modern Sequenced Collections API. The single most-asked area in any Java interview.

0%
Reviewed
0 / 89
Topics done
0 / 15
Est. time left
~20h
Next up
Framework Overview & Hierarchy
15 topics · tap to expand
01

Framework Overview & Hierarchy

JuniorNot started

How the framework is organized — Iterable, Collection, Map, the optional-operations contract, and why "Collection" and "Collections" are different things.

01Why does Map not extend Collection?Mid02What are "optional operations" and why does the framework use them?Mid03Walk through the entire Collection hierarchy from Iterable down.Junior
02

List, ArrayList, LinkedList

JuniorNot started
03

Set, HashSet, LinkedHashSet, TreeSet

JuniorNot started
04

Map, HashMap Internals

MidNot started
05

LinkedHashMap & LRU Cache

MidNot started
06

TreeMap, NavigableMap, SortedMap

MidNot started

Red-black tree under the hood, log-n everything, and the navigation API senior engineers use to solve interval problems.

01What data structure underlies TreeMap?Junior02Time complexity of TreeMap operations.Junior03Difference between SortedMap and NavigableMap.Mid
07

equals and hashCode Contract

MidNot started

The contract every Java developer must internalize: five properties of equals, the hashCode invariant, and the inheritance trap.

01State the full equals contract (all 5 properties).Mid02State the hashCode contract.Mid03What breaks if you override equals but not hashCode?Mid
08

Comparable vs Comparator

JuniorNot started
09

Queue, Deque, ArrayDeque, PriorityQueue

MidNot started
10

Iterator, ListIterator, Iterable, Spliterator

MidNot started
11

Concurrent Collections — ConcurrentHashMap

SeniorNot started
12

BlockingQueue Family

SeniorNot started
13

CopyOnWriteArrayList, ConcurrentSkipListMap, ConcurrentLinkedQueue

SeniorNot started
14

Collections Utility Class

JuniorNot started
15

Modern Features (Java 9–25)

MidNot started