Concurrency & Multithreading
Threads, the Java Memory Model, locks, atomics, executors, CompletableFuture, synchronizers, deadlock, and virtual threads (Loom) — the #1 senior Java filter, from middle to senior interview depth.
Thread Fundamentals & Lifecycle
How to create threads, the six thread states, start vs run, daemon threads, and cooperative interruption — the vocabulary every other topic builds on.
Synchronization & Intrinsic Locks
Race conditions, the synchronized keyword and the monitor it locks, reentrancy, and the wait/notify guarded-block protocol.
Java Memory Model, volatile & happens-before
The contract that makes concurrent code correct: visibility vs atomicity vs ordering, volatile, the happens-before relation, final-field semantics, and why double-checked locking needs volatile.
Explicit Locks: ReentrantLock, ReadWriteLock, StampedLock
The java.util.concurrent.locks toolbox — tryLock, fairness, Condition, read/write separation, optimistic reads, and the AbstractQueuedSynchronizer underneath.
Atomics & Compare-And-Swap
Lock-free programming primitives: CAS, the Atomic* classes, the ABA problem, LongAdder under contention, and the VarHandle API that replaced Unsafe.
Executors & Thread Pools
The Executor framework, every ThreadPoolExecutor parameter, why the Executors factory methods are dangerous in production, pool sizing, rejection policies, and graceful shutdown.
Callable, Future & CompletableFuture
Returning results from tasks and composing asynchronous pipelines: Future limitations, thenApply/thenCompose/thenCombine, the *Async variants, exception handling, and allOf/anyOf.
Synchronizers: Latch, Barrier, Semaphore, Phaser
The coordination toolkit: CountDownLatch, CyclicBarrier, Semaphore, Phaser, and Exchanger — what each does and how they differ.
Deadlock, Livelock & Starvation
The four Coffman conditions, how to reproduce and read a deadlock in a thread dump, lock-ordering prevention, and the difference between livelock and starvation.
Thread-Safety Patterns
Designing for concurrency: what thread-safe really means, immutability, confinement, ThreadLocal and its leak risk, safe publication, and the holder idiom for lazy initialization.
Fork/Join & Parallel Streams
Divide-and-conquer parallelism: the work-stealing ForkJoinPool, RecursiveTask vs RecursiveAction, the common pool trap, and when parallel streams actually help.
Virtual Threads & Structured Concurrency (Loom)
Project Loom: how virtual threads differ from platform threads, mounting/unmounting on carriers, pinning, when to use them, and the structured-concurrency and scoped-value APIs.