Skip to content
JavaAgentic

Type at least two characters. Try “RAG”, “pgvector” or “tool calling”.

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…

0%

Core Java & OOP Foundations

8 topics · 8 published

  1. 1
    The equals() and hashCode() Contract

    The Five Rules · Hash Bucket Lookup · Mutable Key Bug · Records & Lombok · instanceof vs getClass

  2. 2
    Strings: Immutability, the Pool and StringBuilder

    String Pool & intern() · Compact Strings · Concatenation in Loops · StringBuilder vs Buffer · Why Immutability

  3. 3
    OOP Principles the Interviewer Actually Probes

    Overload vs Override · Liskov Substitution · Composition over Inheritance · Abstract vs Interface · Covariant Returns

  4. 4
    Exception Handling, finally and try-with-resources

    Checked vs Unchecked · finally Swallowing Returns · Suppressed Exceptions · Custom Exception Design · Never Catch Throwable

  5. 5
    static, final and Class Initialisation Order

    Load, Link, Initialise · Static Init Blocks · final vs Effectively Final · Compile-Time Constants · Initialisation Deadlock

  6. 6
    Generics, Type Erasure and Wildcards

    Type Erasure · PECS · Bridge Methods · Heap Pollution · Reifiable Types

  7. 7
    Immutable Objects & Defensive Copying

    The Five Conditions · Leaking Collections · Records Are Shallow · Builder Pattern · Thread-Safety for Free

  8. 8
    Comparable, Comparator and Sorting Contracts

    Total Ordering · Contract Violation Exception · Comparator Chaining · Consistency with equals · TimSort Stability

Java 8 & Modern Java

10 topics · 10 published

  1. 9
    Java 8 Features: The Interview Overview

    Lambdas · Streams · Optional · Default Methods · java.time

  2. 10
    Lambdas and invokedynamic: How They Really Work

    Not an Anonymous Class · LambdaMetafactory · Capturing vs Non-Capturing · Effectively Final · Method References

  3. 11
    Functional Interfaces: Function, Predicate, Supplier, Consumer

    @FunctionalInterface · The 43 Built-ins · Primitive Specialisations · compose vs andThen · Checked Exception Problem

  4. 12
    Stream API Fundamentals: Lazy Pipelines

    Source, Intermediate, Terminal · Laziness & Short-Circuit · Spliterator · Stateless vs Stateful · Streams Are Single-Use

  5. 13
    Collectors, groupingBy and Downstream Collectors

    toMap Duplicate Key · Multi-Level groupingBy · partitioningBy · teeing & flatMapping · Custom Collector

  6. 14
    Parallel Streams and the Common ForkJoinPool

    Common Pool Sharing · Splittable Sources · N x Q Rule · Ordering Costs · Blocking Calls Poison It

  7. 15
    Optional: Correct Use and Common Abuse

    Return Type Only · Never a Field or Param · orElse vs orElseGet · map & flatMap Chains · Optional.get() Is a Smell

  8. 16
    Default & Static Methods in Interfaces

    Interface Evolution · Diamond Resolution · Class Wins Rule · X.super.method() · Private Interface Methods

  9. 17
    The java.time API

    Instant vs LocalDateTime · ZonedDateTime & Offsets · Period vs Duration · DST Gaps & Overlaps · Storing Timestamps

  10. 18
    Modern Java 9-21: Records, Sealed Types, Pattern Matching

    Records · Sealed Interfaces · Pattern Matching for switch · Text Blocks · JPMS & Virtual Threads

  1. 19
    The Collections Framework Map

    Interface Hierarchy · List, Set, Queue, Map · Optional Operations · Immutable Factories · Arrays.asList Traps

  2. 20
    ArrayList vs LinkedList: Internals and Growth

    1.5x Growth & Copying · Node Overhead · Cache Locality · ensureCapacity · Why LinkedList Rarely Wins

  3. 21
    HashMap Internals: Buckets, Resize and Treeification

    hash() Spreading · Load Factor 0.75 · Resize & Rehash · Treeify at 8 · Java 7 Race Condition

  4. 22
    ConcurrentHashMap vs Hashtable vs synchronizedMap

    CAS + Bin Locking · No Segments Since Java 8 · computeIfAbsent Deadlock · Weakly Consistent Iterators · size() Is Approximate

  5. 23
    TreeMap, LinkedHashMap and Building an LRU Cache

    Red-Black Tree · NavigableMap Range Queries · Access Order · removeEldestEntry · When to Use Caffeine

  6. 24
    HashSet, LinkedHashSet and TreeSet

    Backed by a Map · Iteration Order · Comparator-Based Equality · EnumSet Bit Vector · CopyOnWriteArraySet

  7. 25
    Queues, Deques and BlockingQueues

    add vs offer vs put · ArrayBlockingQueue · LinkedBlockingQueue Unbounded · PriorityQueue Heap · SynchronousQueue Handoff

  8. 26
    Fail-Fast vs Fail-Safe Iterators

    modCount · ConcurrentModificationException · Iterator.remove() · removeIf · CopyOnWriteArrayList Snapshots

  9. 27
    Choosing a Collection: Complexity and Memory Footprint

    Big-O Table · Bytes Per Entry · Boxing Overhead · Primitive Collections · Sizing to Avoid Resize

Concurrency & Multithreading

8 topics · 8 published

  1. 28
    Threads: Lifecycle, Creation and What One Costs

    Six Thread States · start() vs run() · 1MB Stack Cost · Daemon Threads · Interruption Protocol

  2. 29
    synchronized, Locks and the Java Memory Model

    Happens-Before · Monitor Enter/Exit · Reordering & Visibility · ReentrantLock Extras · ReadWriteLock & StampedLock

  3. 30
    volatile, Atomics and the Visibility Problem

    Visibility, Not Atomicity · Double-Checked Locking · CAS & ABA · LongAdder vs AtomicLong · False Sharing

  4. 31
    ExecutorService and Thread-Pool Sizing

    Core vs Max vs Queue · Unbounded Queue Trap · Rejection Policies · Little’s Law Sizing · Graceful Shutdown

  5. 32
    CompletableFuture and Async Composition

    thenApply vs thenCompose · allOf & anyOf · Which Thread Runs It · Exception Propagation · Timeouts

  6. 33
    Deadlock, Livelock and Starvation

    Coffman Conditions · Lock Ordering · jstack Detection · tryLock with Timeout · Nested Pool Starvation

  7. 34
    CountDownLatch, Semaphore, CyclicBarrier and Phaser

    One-Shot vs Reusable · Permits & Bulkheads · Barrier Actions · Exchanger · AbstractQueuedSynchronizer

  8. 35
    Virtual Threads and Structured Concurrency

    Mount & Unmount · Pinning on synchronized · Pools Become Pointless · Thread-Local Cost · StructuredTaskScope

JVM Memory, GC & Performance

9 topics · 9 published

  1. 36
    JVM Memory Areas: Heap, Stack, Metaspace, Direct

    Young & Old Generations · Thread Stacks · Metaspace Since Java 8 · Direct & Mapped Buffers · Native Memory Tracking

  2. 37
    Garbage Collectors: Serial, Parallel, G1, ZGC, Shenandoah

    Mark, Sweep, Compact · Generational Hypothesis · G1 Regions & Pause Target · Concurrent Collectors · Throughput vs Latency

  3. 38
    Reading GC Logs and Tuning Without Guessing

    Unified Logging · Allocation Rate · Promotion & Humongous · Full GC Causes · What Not to Tune

  4. 39
    The Seven Classic Java Memory Leaks

    Static Collections · Unremoved Listeners · ThreadLocal in Pools · ClassLoader Leaks · Unclosed Resources

  5. 40
    Every OutOfMemoryError and What It Means

    Java Heap Space · GC Overhead Limit · Metaspace · Unable to Create Thread · Direct Buffer Memory

  6. 41
    Heap Dump Analysis with MAT

    Capturing on OOM · Shallow vs Retained · Dominator Tree · Leak Suspects Report · GC Roots Path

  7. 42
    JVM Flags and Container Awareness in Kubernetes

    UseContainerSupport · MaxRAMPercentage · Heap Is Not RSS · CPU Quota & GC Threads · OOMKilled vs OOMError

  8. 43
    Profiling with JFR and async-profiler

    Continuous JFR · Safepoint Bias · Flame Graphs · Allocation Profiling · Wall vs CPU Clock

  9. 44
    Object Layout, Escape Analysis and the JIT

    Header & Alignment · Compressed Oops · C1, C2 & Tiered · Scalar Replacement · Deoptimisation

Production Load & Real Incidents

9 topics · 9 published

  1. 45
    Debugging a 100% CPU Spike in Production

    top -H & nid Mapping · Thread Dump Triage · Infinite Resize Loop · Regex Backtracking · GC vs Application CPU

  2. 46
    HikariCP Connection-Pool Exhaustion

    Connection Is Not Free · Leak Detection Threshold · Transaction Scope · Pool Size Formula · Timeout Cascade

  3. 47
    Thread-Pool Starvation and Queue Collapse

    Blocked Worker Threads · Unbounded Queue Latency · Nested Pool Dependency · Bulkhead Isolation · Queue Depth Alerts

  4. 48
    The N+1 Query and the Endpoint That Got Slow

    Lazy Loading Explosion · JOIN FETCH & EntityGraph · Missing Index · EXPLAIN ANALYZE · Pagination with Joins

  5. 49
    Latency Spikes: Proving It Was (or Was Not) GC

    p99 vs Average · Coordinated Omission · Safepoint Pauses · Correlating GC Logs · Allocation Reduction

  6. 50
    Cascading Failure: Timeouts, Retries and Backpressure

    Retry Storms · Timeout Budgets · Circuit Breakers · Jittered Backoff · Load Shedding

  7. 51
    Cache Stampede, Hot Keys and Stale Reads

    Thundering Herd · Probabilistic Early Expiry · Single-Flight Loading · Hot Key Sharding · Invalidation Races

  8. 52
    Capacity Planning: Finding the Knee Before Production Does

    Open vs Closed Models · Finding the Knee · Little’s Law · Headroom & Autoscaling · k6 & Gatling

  9. 53
    The Incident Playbook: Answering "Tell Me About an Outage"

    Detect, Mitigate, Fix · USE & RED Methods · Blameless Postmortem · Structuring the Story · What Interviewers Score

Interview Strategy & Rounds

5 topics · 5 published

  1. 54
    The Coding Round: Patterns That Keep Coming Back

    Two Pointers & Sliding Window · HashMap Counting · BFS/DFS Templates · Java-Specific Gotchas · Talking While Coding

  2. 55
    Spring & Spring Boot Interview Questions

    IoC & Bean Lifecycle · Auto-Configuration · Proxy Self-Invocation · @Transactional Semantics · Scopes & Testing Slices

  3. 56
    System Design for Java Backend Engineers

    Requirements & Estimation · Data Model First · Consistency Trade-offs · Idempotency & Outbox · Talking Numbers

  4. 57
    The Behavioural Round: STAR Stories for Engineers

    STAR Structure · Six Stories Cover Everything · Conflict & Failure · Quantifying Impact · Surviving Follow-Ups

  5. 58
    The Eight-Week Preparation Plan

    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.

Other roadmaps