From core Java recall to production war stories
The Java Interview Mastery Roadmap
Fifty-eight topics covering what Java interviews actually test: the language semantics behind the stock questions, collection and JVM internals, concurrency, and nine real production incidents — memory leaks, CPU spikes, pool exhaustion and load collapse — told as stories you can retell in a room.
Who it is for: Java developers preparing for interviews at any level, and engineers who want the internals behind what they use daily
Your progress
Loading…
Core Java & OOP Foundations
8 topics · 8 published
- 1The equals() and hashCode() ContractBeginner
The Five Rules · Hash Bucket Lookup · Mutable Key Bug · Records & Lombok · instanceof vs getClass
- 2Strings: Immutability, the Pool and StringBuilderBeginner
String Pool & intern() · Compact Strings · Concatenation in Loops · StringBuilder vs Buffer · Why Immutability
- 3OOP Principles the Interviewer Actually ProbesBeginner
Overload vs Override · Liskov Substitution · Composition over Inheritance · Abstract vs Interface · Covariant Returns
- 4Exception Handling, finally and try-with-resourcesBeginner
Checked vs Unchecked · finally Swallowing Returns · Suppressed Exceptions · Custom Exception Design · Never Catch Throwable
- 5static, final and Class Initialisation OrderIntermediate
Load, Link, Initialise · Static Init Blocks · final vs Effectively Final · Compile-Time Constants · Initialisation Deadlock
- 6Generics, Type Erasure and WildcardsIntermediate
Type Erasure · PECS · Bridge Methods · Heap Pollution · Reifiable Types
- 7Immutable Objects & Defensive CopyingIntermediate
The Five Conditions · Leaking Collections · Records Are Shallow · Builder Pattern · Thread-Safety for Free
- 8Comparable, Comparator and Sorting ContractsIntermediate
Total Ordering · Contract Violation Exception · Comparator Chaining · Consistency with equals · TimSort Stability
Java 8 & Modern Java
10 topics · 10 published
- 9Java 8 Features: The Interview OverviewBeginner
Lambdas · Streams · Optional · Default Methods · java.time
- 10Lambdas and invokedynamic: How They Really WorkIntermediate
Not an Anonymous Class · LambdaMetafactory · Capturing vs Non-Capturing · Effectively Final · Method References
- 11Functional Interfaces: Function, Predicate, Supplier, ConsumerBeginner
@FunctionalInterface · The 43 Built-ins · Primitive Specialisations · compose vs andThen · Checked Exception Problem
- 12Stream API Fundamentals: Lazy PipelinesIntermediate
Source, Intermediate, Terminal · Laziness & Short-Circuit · Spliterator · Stateless vs Stateful · Streams Are Single-Use
- 13Collectors, groupingBy and Downstream CollectorsIntermediate
toMap Duplicate Key · Multi-Level groupingBy · partitioningBy · teeing & flatMapping · Custom Collector
- 14Parallel Streams and the Common ForkJoinPoolAdvanced
Common Pool Sharing · Splittable Sources · N x Q Rule · Ordering Costs · Blocking Calls Poison It
- 15Optional: Correct Use and Common AbuseBeginner
Return Type Only · Never a Field or Param · orElse vs orElseGet · map & flatMap Chains · Optional.get() Is a Smell
- 16Default & Static Methods in InterfacesIntermediate
Interface Evolution · Diamond Resolution · Class Wins Rule · X.super.method() · Private Interface Methods
- 17The java.time APIBeginner
Instant vs LocalDateTime · ZonedDateTime & Offsets · Period vs Duration · DST Gaps & Overlaps · Storing Timestamps
- 18Modern Java 9-21: Records, Sealed Types, Pattern MatchingIntermediate
Records · Sealed Interfaces · Pattern Matching for switch · Text Blocks · JPMS & Virtual Threads
Collections & Data Structure Internals
9 topics · 9 published
- 19The Collections Framework MapBeginner
Interface Hierarchy · List, Set, Queue, Map · Optional Operations · Immutable Factories · Arrays.asList Traps
- 20ArrayList vs LinkedList: Internals and GrowthBeginner
1.5x Growth & Copying · Node Overhead · Cache Locality · ensureCapacity · Why LinkedList Rarely Wins
- 21HashMap Internals: Buckets, Resize and TreeificationIntermediate
hash() Spreading · Load Factor 0.75 · Resize & Rehash · Treeify at 8 · Java 7 Race Condition
- 22ConcurrentHashMap vs Hashtable vs synchronizedMapAdvanced
CAS + Bin Locking · No Segments Since Java 8 · computeIfAbsent Deadlock · Weakly Consistent Iterators · size() Is Approximate
- 23TreeMap, LinkedHashMap and Building an LRU CacheIntermediate
Red-Black Tree · NavigableMap Range Queries · Access Order · removeEldestEntry · When to Use Caffeine
- 24HashSet, LinkedHashSet and TreeSetBeginner
Backed by a Map · Iteration Order · Comparator-Based Equality · EnumSet Bit Vector · CopyOnWriteArraySet
- 25Queues, Deques and BlockingQueuesIntermediate
add vs offer vs put · ArrayBlockingQueue · LinkedBlockingQueue Unbounded · PriorityQueue Heap · SynchronousQueue Handoff
- 26Fail-Fast vs Fail-Safe IteratorsIntermediate
modCount · ConcurrentModificationException · Iterator.remove() · removeIf · CopyOnWriteArrayList Snapshots
- 27Choosing a Collection: Complexity and Memory FootprintIntermediate
Big-O Table · Bytes Per Entry · Boxing Overhead · Primitive Collections · Sizing to Avoid Resize
Concurrency & Multithreading
8 topics · 8 published
- 28Threads: Lifecycle, Creation and What One CostsBeginner
Six Thread States · start() vs run() · 1MB Stack Cost · Daemon Threads · Interruption Protocol
- 29synchronized, Locks and the Java Memory ModelAdvanced
Happens-Before · Monitor Enter/Exit · Reordering & Visibility · ReentrantLock Extras · ReadWriteLock & StampedLock
- 30volatile, Atomics and the Visibility ProblemIntermediate
Visibility, Not Atomicity · Double-Checked Locking · CAS & ABA · LongAdder vs AtomicLong · False Sharing
- 31ExecutorService and Thread-Pool SizingIntermediate
Core vs Max vs Queue · Unbounded Queue Trap · Rejection Policies · Little’s Law Sizing · Graceful Shutdown
- 32CompletableFuture and Async CompositionAdvanced
thenApply vs thenCompose · allOf & anyOf · Which Thread Runs It · Exception Propagation · Timeouts
- 33Deadlock, Livelock and StarvationAdvanced
Coffman Conditions · Lock Ordering · jstack Detection · tryLock with Timeout · Nested Pool Starvation
- 34CountDownLatch, Semaphore, CyclicBarrier and PhaserIntermediate
One-Shot vs Reusable · Permits & Bulkheads · Barrier Actions · Exchanger · AbstractQueuedSynchronizer
- 35Virtual Threads and Structured ConcurrencyAdvanced
Mount & Unmount · Pinning on synchronized · Pools Become Pointless · Thread-Local Cost · StructuredTaskScope
JVM Memory, GC & Performance
9 topics · 9 published
- 36JVM Memory Areas: Heap, Stack, Metaspace, DirectIntermediate
Young & Old Generations · Thread Stacks · Metaspace Since Java 8 · Direct & Mapped Buffers · Native Memory Tracking
- 37Garbage Collectors: Serial, Parallel, G1, ZGC, ShenandoahAdvanced
Mark, Sweep, Compact · Generational Hypothesis · G1 Regions & Pause Target · Concurrent Collectors · Throughput vs Latency
- 38Reading GC Logs and Tuning Without GuessingAdvanced
Unified Logging · Allocation Rate · Promotion & Humongous · Full GC Causes · What Not to Tune
- 39The Seven Classic Java Memory LeaksAdvanced
Static Collections · Unremoved Listeners · ThreadLocal in Pools · ClassLoader Leaks · Unclosed Resources
- 40Every OutOfMemoryError and What It MeansAdvanced
Java Heap Space · GC Overhead Limit · Metaspace · Unable to Create Thread · Direct Buffer Memory
- 41Heap Dump Analysis with MATAdvanced
Capturing on OOM · Shallow vs Retained · Dominator Tree · Leak Suspects Report · GC Roots Path
- 42JVM Flags and Container Awareness in KubernetesAdvanced
UseContainerSupport · MaxRAMPercentage · Heap Is Not RSS · CPU Quota & GC Threads · OOMKilled vs OOMError
- 43Profiling with JFR and async-profilerAdvanced
Continuous JFR · Safepoint Bias · Flame Graphs · Allocation Profiling · Wall vs CPU Clock
- 44Object Layout, Escape Analysis and the JITExpert
Header & Alignment · Compressed Oops · C1, C2 & Tiered · Scalar Replacement · Deoptimisation
Production Load & Real Incidents
9 topics · 9 published
- 45Debugging a 100% CPU Spike in ProductionAdvanced
top -H & nid Mapping · Thread Dump Triage · Infinite Resize Loop · Regex Backtracking · GC vs Application CPU
- 46HikariCP Connection-Pool ExhaustionAdvanced
Connection Is Not Free · Leak Detection Threshold · Transaction Scope · Pool Size Formula · Timeout Cascade
- 47Thread-Pool Starvation and Queue CollapseAdvanced
Blocked Worker Threads · Unbounded Queue Latency · Nested Pool Dependency · Bulkhead Isolation · Queue Depth Alerts
- 48The N+1 Query and the Endpoint That Got SlowIntermediate
Lazy Loading Explosion · JOIN FETCH & EntityGraph · Missing Index · EXPLAIN ANALYZE · Pagination with Joins
- 49Latency Spikes: Proving It Was (or Was Not) GCAdvanced
p99 vs Average · Coordinated Omission · Safepoint Pauses · Correlating GC Logs · Allocation Reduction
- 50Cascading Failure: Timeouts, Retries and BackpressureAdvanced
Retry Storms · Timeout Budgets · Circuit Breakers · Jittered Backoff · Load Shedding
- 51Cache Stampede, Hot Keys and Stale ReadsAdvanced
Thundering Herd · Probabilistic Early Expiry · Single-Flight Loading · Hot Key Sharding · Invalidation Races
- 52Capacity Planning: Finding the Knee Before Production DoesIntermediate
Open vs Closed Models · Finding the Knee · Little’s Law · Headroom & Autoscaling · k6 & Gatling
- 53The Incident Playbook: Answering "Tell Me About an Outage"Intermediate
Detect, Mitigate, Fix · USE & RED Methods · Blameless Postmortem · Structuring the Story · What Interviewers Score
Interview Strategy & Rounds
5 topics · 5 published
- 54The Coding Round: Patterns That Keep Coming BackIntermediate
Two Pointers & Sliding Window · HashMap Counting · BFS/DFS Templates · Java-Specific Gotchas · Talking While Coding
- 55Spring & Spring Boot Interview QuestionsIntermediate
IoC & Bean Lifecycle · Auto-Configuration · Proxy Self-Invocation · @Transactional Semantics · Scopes & Testing Slices
- 56System Design for Java Backend EngineersAdvanced
Requirements & Estimation · Data Model First · Consistency Trade-offs · Idempotency & Outbox · Talking Numbers
- 57The Behavioural Round: STAR Stories for EngineersBeginner
STAR Structure · Six Stories Cover Everything · Conflict & Failure · Quantifying Impact · Surviving Follow-Ups
- 58The Eight-Week Preparation PlanBeginner
Weekly Breakdown · Spaced Repetition · Mock Interviews · Resume to Story Mapping · Offer Negotiation
Build it for real
Reading a roadmap teaches you the vocabulary. Shipping the project is what makes it stick.