Interview prep · 5 YOE
Java Spring Boot Interview Roadmap
A complete interview-prep plan for Java backend engineers with around five years of experience: 13 phases, 105 ranked topics, DSA targets, 30/60/90-day schedules and a production project to talk about.
Core topics covered
0/100
0%
Project milestones: 0/10
Saved in this browser as you tick items off.
01
Master roadmap
Thirteen phases, ordered by dependency. Phases 1–6 are the interview core and take about 60% of your time; add the rest depending on the company tier you're targeting.
- 1
Core Java, collections, concurrency, JVM
Must-knowDepends on: nothingTime share15% - 2
Data structures and algorithms
Must-know (critical for product companies)Depends on: phase 1Time share14% - 3
Java 8+ Streams and functional style
Must-knowDepends on: phase 1Time share5% - 4
Spring Framework and Spring Boot internals
Must-knowDepends on: phase 1Time share12% - 5
REST API design
Must-knowDepends on: phase 4Time share6% - 6
JPA, Hibernate, SQL
Must-knowDepends on: phase 4Time share12% - 7
Microservices
Should-know (must-know for product and senior roles)Depends on: phase 4, 5, 6Time share8% - 8
Spring Security and JWT
Must-know basics, should-know OAuth2/OIDCDepends on: phase 4, 5Time share4% - 9
Testing and code quality
Must-knowDepends on: phase 4Time share4% - 10
Kafka, Redis, performance tuning
Should-knowDepends on: phase 7Time share5% - 11
Low-level and high-level system design
Must-know for product roles, should-know elsewhereDepends on: phase 1, 7, 10Time share8% - 12
Angular and full-stack TypeScript basics
Only for full-stack roles; skip for backend-onlyDepends on: nothingTime share4% - 13
Docker, CI/CD, Kubernetes, cloud
Should-know; Kubernetes internals optionalDepends on: phase 4Time share3%
Where the depth line sits
A 5-year engineer is expected to explain and debug Saga and outbox at concept level, circuit-breaker settings, Kafka consumer groups and offsets, and cache-aside. Architect-level topics you can treat as advanced: multi-region replication, consensus protocols, service mesh internals, and Kafka exactly-once transactions in detail.Version note
Most interviews and production codebases still revolve around Java 8, 11, 17 and 21 with Spring Boot 2.7 or 3.x. Check the target team's stack and the current Spring Boot release line before each interview.02
Prioritized syllabus
Study in this order. P0 first, always.
P0Asked in almost every Java backend interview
HashMap internals, equals/hashCode, String immutability, exceptions, OOP and SOLID
Asked at every company; shallow answers eliminate candidates early
Streams (groupingBy, flatMap, Optional), collections choice
Standard coding-round material
Multithreading basics: synchronized, volatile, ExecutorService, deadlock
Core of the 5-year Java bar
Spring DI, bean lifecycle, @Transactional, auto-configuration, MVC flow
Spring Boot rounds revolve around these
REST design, status codes, idempotency, validation, exception handling
Asked directly and inside project discussion
JPA lazy loading, N+1, SQL joins, indexes, window functions
Almost every backend round includes a SQL or Hibernate question
Arrays, strings, hashing, two pointers, sliding window, linked lists
Minimum DSA bar for all tiers
Project architecture explanation and debugging a slow API
Decides the offer in most service-company and Big 4 rounds
P1Separates strong candidates from average ones
Microservices resilience, Saga, outbox, Kafka consumer groups, Redis caching
Expected from 5-year engineers at MNCs and product companies
JWT flow, Spring Security filter chain, CORS vs CSRF
Common follow-up after any REST answer
JUnit 5, Mockito, Spring Boot slices, Testcontainers
Quality-minded teams ask for test strategy
Trees, graphs, heaps, intervals, basic dynamic programming
Product-company coding rounds
Low-level design (parking lot, rate limiter) and design patterns
Product companies and senior MNC roles
Garbage collection, heap and thread dumps, memory leaks
Production-experience check
P2Matters for specific teams or senior bars
High-level system design, capacity estimation
Product companies; senior bands
Angular, RxJS, change detection
Only for full-stack job descriptions
Docker, CI/CD, Kubernetes, cloud services
Usually a few questions; deeper at platform-heavy teams
Distributed locking, exactly-once semantics, multi-region designs
Advanced follow-ups, architect-leaning roles
03
What each company category expects
These are general hiring patterns, not guarantees. Rounds, difficulty and focus vary by team, role level and year — check recent public interview reports and the job description before each interview.
| Dimension | Big 4 and consultingDeloitte, PwC, EY, KPMG | Top MNCs and IT servicesAccenture, Capgemini, Cognizant, Infosys, TCS, Wipro, HCLTech, LTIMindtree, IBM, NTT DATA | Product and technology companiesAmazon, Microsoft, Walmart Global Tech, Oracle, SAP, Adobe, Salesforce, PayPal, Intuit, Atlassian, mid-size firms |
|---|---|---|---|
| Typical difficulty | Moderate | Moderate to high at premium or digital bands; moderate otherwise | High to very high |
| Technical depth | Java, Spring Boot, REST, SQL, project depth; practical “how did you implement” questions | Same core plus microservices, Kafka, cloud, and often a coding round | Fundamentals plus internals, trade-offs and scale; follow-ups go several levels deep |
| Coding expectation | Easy to medium: strings, arrays, collections, simple Streams | Easy to medium, sometimes medium-hard; machine coding or take-home at some | Medium to hard DSA, timed, on a shared editor; clean code and test cases expected |
| System design | Light; architecture of your own project | Project architecture; some HLD at senior bands | LLD and HLD rounds expected; ownership of trade-offs and failure modes |
| Project discussion | Heavy; your exact role, modules, challenges | Heavy; production issues, performance, deployments | Heavy and probing; metrics, decisions, what you would change |
| Behavioral | Standard HR and client-facing communication | Standard HR, flexibility, notice period | Structured, often principle-based (e.g. ownership stories); needs prepared stories |
| Top preparation priorities | P0 syllabus, project story, SQL, 60 curated DSA problems | P0 and P1 syllabus, microservices, Kafka basics, project story | Product-grade DSA, LLD, HLD, concurrency, behavioral stories |
| Common elimination risks | Weak fundamentals, vague project answers, cannot explain own code | Memorized answers with no depth, weak coding speed, unclear production experience | Fails DSA bar, cannot reason about trade-offs, unstructured design answers |
04
The 105 highest-priority interview topics
Numbered so you can track them. Within each group, earlier items are asked more often. Tick a topic once you can answer it aloud in under two minutes, with a follow-up.
Core Java
Topics 1–14
- 1JVM memory areas and class loading
- 2Garbage collectors (G1, ZGC) and tuning basics
- 3equals/hashCode contract
- 4String immutability and the string pool
- 5HashMap internals
- 6ConcurrentHashMap
- 7ArrayList vs LinkedList
- 8Comparable vs Comparator
- 9Exception hierarchy and try-with-resources
- 10Generics and type erasure
- 11Interface vs abstract class, default methods
- 12SOLID with examples
- 13Records, sealed classes, pattern matching (Java 17/21)
- 14Immutability and defensive copying
Streams
Topics 15–20
- 15map vs flatMap
- 16groupingBy, partitioningBy, toMap
- 17Stream laziness and short-circuiting
- 18Optional best practices
- 19Parallel stream pitfalls
- 20CompletableFuture composition and error handling
Concurrency
Topics 21–27
- 21synchronized vs ReentrantLock
- 22volatile and happens-before
- 23Atomic classes and CAS
- 24ExecutorService and thread pool sizing
- 25Deadlock causes and detection
- 26Virtual threads (Java 21)
- 27Thread-safe singleton
Spring and Boot
Topics 28–42
- 28IoC and DI
- 29Bean lifecycle and scopes
- 30Constructor vs field injection
- 31Circular dependencies
- 32Proxies and AOP (JDK vs CGLIB)
- 33@Transactional internals and self-invocation
- 34Propagation and isolation
- 35DispatcherServlet request flow
- 36Filter vs interceptor vs aspect
- 37Auto-configuration
- 38Conditional annotations
- 39Profiles and externalized configuration
- 40Actuator
- 41@ControllerAdvice error handling
- 42Bean Validation
REST and security
Topics 43–52
- 43REST constraints and idempotency
- 44Status code selection
- 45DTO vs entity
- 46Pagination and filtering
- 47API versioning
- 48Security filter chain
- 49JWT flow with refresh tokens
- 50OAuth 2.0 and OpenID Connect
- 51CORS vs CSRF
- 52Idempotency keys for payment-style APIs
JPA and SQL
Topics 53–66
- 53Entity lifecycle and dirty checking
- 54Lazy vs eager fetching
- 55N+1 problem and fixes
- 56Cascade and orphanRemoval
- 57Optimistic vs pessimistic locking
- 58First- and second-level cache
- 59Indexes and execution plans
- 60Isolation levels and anomalies
- 61Join types
- 62Window functions and CTEs
- 63Nth highest salary and duplicate removal
- 64Diagnosing a slow query
- 65Keyset vs offset pagination
- 66HikariCP pool tuning
Microservices and messaging
Topics 67–80
- 67Monolith vs microservices trade-offs
- 68API Gateway
- 69Service discovery
- 70Resilience4j: circuit breaker, retry, bulkhead
- 71Timeouts and exponential backoff
- 72Saga pattern
- 73Transactional outbox
- 74Idempotent consumers
- 75Kafka partitions, consumer groups, offsets
- 76Delivery semantics
- 77Retry topics and dead-letter queues
- 78Redis cache-aside and invalidation
- 79Distributed tracing and correlation IDs
- 80Eventual consistency
Testing and design
Topics 81–88
- 81JUnit 5, Mockito, mock vs spy
- 82@SpringBootTest vs test slices
- 83Testcontainers
- 84Strategy pattern
- 85Factory and Builder
- 86Observer, Decorator, Adapter
- 87Singleton pitfalls
- 88Clean code and code review practice
System design
Topics 89–94
- 89URL shortener
- 90Rate limiter
- 91E-commerce order system
- 92Notification service
- 93Capacity estimation
- 94Consistency vs availability trade-offs
DSA
Topics 95–98
- 95Hashing, two pointers, sliding window
- 96Linked lists and LRU cache
- 97Trees, BFS, DFS
- 98Heaps, top-K, basic dynamic programming
Production and DevOps
Topics 99–100
- 99Debugging a slow API, heap and thread dumps, memory leaks
- 100Docker, CI/CD, Kubernetes basics
Full-stack add-onFull stack only
Topics 101–105
- 101RxJS switchMap vs mergeMap vs concatMap vs exhaustMap
- 102Change detection and OnPush
- 103Route guards and interceptors
- 104Reactive forms
- 105Angular + Spring Boot integration (JWT, CORS, file upload)
05
Curated DSA practice list
About 120 problems in three nested targets. Solve each in Java by yourself first, state time and space complexity aloud, then list edge cases.
| Pattern | Target A (Big 4 / service) | + Target B (Top MNC) | + Target C (Product) |
|---|---|---|---|
| Arrays and strings | Reverse string and words; find duplicates; missing number; first non-repeating character; palindrome; move zeroes | Rotate array; product of array except self; longest common prefix; string compression | Trapping rain water; minimum window substring; next permutation |
| Hashing | Two Sum; frequency counts; group anagrams; valid anagram | Subarray sum equals K; longest consecutive sequence | Four Sum; longest substring with at most K distinct characters |
| Two pointers and sliding window | Three Sum; container with most water | Longest substring without repeating characters; max sum subarray of size K | Sliding window maximum; permutation in string |
| Sorting and binary search | Binary search; first and last position | Search in rotated array; merge sorted arrays | Median of two sorted arrays; capacity to ship packages (search on answer) |
| Linked lists | Reverse a list; detect cycle; middle node | Merge two sorted lists; remove nth from end; palindrome list | LRU cache; reverse nodes in K-group; copy list with random pointer |
| Stacks and queues | Balanced parentheses; min stack | Next greater element; queue using stacks | Largest rectangle in histogram; daily temperatures variants |
| Recursion and backtracking | Fibonacci with memo; subsets | Permutations; combination sum | N-Queens; word search |
| Trees and BSTs | Traversals; max depth; validate BST | Level order; lowest common ancestor | Serialize and deserialize tree; diameter and path-sum variants |
| Heaps | Kth largest element | Top K frequent elements; merge K sorted lists | Find median from data stream; task scheduler |
| Graphs | BFS and DFS basics; number of islands | Course schedule (topological sort); clone graph | Word ladder; Dijkstra shortest path; union-find problems |
| Greedy and intervals | Merge intervals | Meeting rooms II; insert interval | Non-overlapping intervals variants; jump game II |
| Dynamic programming | Climbing stairs; house robber | Coin change; longest increasing subsequence | Longest common subsequence; edit distance; knapsack variants |
| Prefix sums and monotonic stack | Running sum; range sum query | Subarray sums with prefix map | Monotonic stack problems; range queries |
06
Study schedules: 30, 60 and 90 days
2 hours per weekday, 4 hours per weekend day — about 18 hours a week. If your time changes, keep the daily structure and stretch or compress the weeks.
Weekday · 2 hours
- 40mLearn and read internals
- 50mHands-on: code, project milestone or DSA
- 15mAnswer 3 questions aloud without notes
- 15mRevise from the mistake log and flashcards
Weekend · 4 hours a day
Saturday: 2 h build plus 2 h timed coding or a mock interview. Sunday: 1.5 h weekly test and mistake review, 1.5 h project milestone, 1 h plan the next week. Never spend more than one-third of a session watching or reading.Done for the day when
You can explain the day's topic in two minutes aloud, and you have working code or a solved problem committed to Git.| Weeks | Focus | Milestone |
|---|---|---|
| 1–2 | Core Java and collections; Streams module (30 exercises) | Topics 1–20 complete; 40 DSA problems |
| 3–4 | Concurrency; DSA arrays, hashing, linked lists, stacks | Topics 21–27; 30 more problems; mock 1 |
| 5–6 | Spring and Boot internals; REST; project milestones M1–M3 | Topics 28–47; REST API with validation and error handling running |
| 7 | JPA, Hibernate, SQL | Topics 53–66; N+1 reproduced and fixed in the project |
| 8 | Security, JWT; testing | Topics 48–52, 81–83; JWT and role-based access in the project |
| 9 | Microservices, Kafka, Redis | Topics 67–80; outbox and retry demo in the project |
| 10 | DSA trees, graphs, heaps, DP basics; LLD patterns | 35 problems; 3 LLD designs |
| 11 | HLD, project deep-dive, behavioral stories | 4 HLD designs; 6 prepared stories |
| 12 (days 57–60) | Full mock series, weak-topic repair, final checklist | Readiness scorecard: all subjects at target |
Adjusting: Fall behind by more than two days: drop P2 topics first, never P0. Ahead of schedule: add a mock interview, not new theory.
07
Production project: e-commerce order and inventory system
Build it in ten milestones, one at a time, each ending with a working commit and a spoken explanation. Angular is an optional last milestone. Only describe in interviews what you built or truly worked on, and say clearly which parts are practice projects.
M1Skeleton and conventions
Click the circle when builtLayered packages, profiles, global exception handling, logging with correlation IDs
Unlocks in interviews: Package structure, request lifecycle, error contract
M2Users, roles, products
Click the circle when builtProduct catalog CRUD, DTO mapping, validation, pagination, filtering
Unlocks in interviews: REST design, entity vs DTO, pagination trade-offs
M3Security
Click the circle when builtJWT access and refresh tokens, role-based and method-level security
Unlocks in interviews: Security filter chain, token handling, CORS and CSRF
M4Inventory and cart
Click the circle when builtStock reservation with optimistic locking
Unlocks in interviews: Concurrent updates, lost-update prevention
M5Orders
Click the circle when builtOrder creation with idempotency key, status tracking, audit log
Unlocks in interviews: Duplicate-order prevention, transaction boundaries
M6Persistence tuning
Click the circle when builtReproduce and fix N+1, add indexes, read execution plans, batch inserts
Unlocks in interviews: JPA fetch strategies, slow-query debugging
M7Events
Click the circle when builtKafka order events, transactional outbox, idempotent consumer, retry topic and DLQ
Unlocks in interviews: Delivery semantics, Saga, eventual consistency
M8Payment and notifications
Click the circle when builtSimulated payment service with Resilience4j timeout, retry, circuit breaker
Unlocks in interviews: Downstream failure handling, graceful degradation
M9Caching and observability
Click the circle when builtRedis cache-aside for catalog, Actuator, metrics, distributed tracing
Unlocks in interviews: Cache invalidation, monitoring, performance
M10Quality and delivery
Click the circle when builtUnit, slice and Testcontainers tests, Dockerfile and Compose, CI pipeline, deployment notes
Unlocks in interviews: Test strategy, CI quality gates, release and rollback
Rule per milestone: Write the design in 10 lines first, build it, then record a two-minute spoken explanation including one thing that could fail in production and how you would detect it.
08
Readiness scorecard
You are ready in a subject when you meet its objective criteria, not when the syllabus is finished. Score yourself weekly (1–10); 7+ is the target.
—
average score
0/11
subjects at 7+
Core Java and collections
Ready when: Topics 1–14 each answered correctly in under 2 minutes with an internals follow-up; mock score 7+
Streams
Ready when: 25 of 30 exercises solved without notes in 45 minutes
Concurrency
Ready when: Explain and fix a race condition and a deadlock; choose a thread-pool size with reasoning
DSA
Ready when: Service targets: 35 of 40 Target A problems solved in 25 minutes each. Product: 2 mediums in 45 minutes, 70% pass rate over 10 timed sessions
Spring and Boot
Ready when: Draw the request lifecycle and a bean lifecycle; explain @Transactional pitfalls with a failing example
REST and security
Ready when: Design an API with correct status codes and idempotency; trace a JWT request through the filter chain
JPA and SQL
Ready when: Reproduce and fix N+1; write window-function and join queries in 10 minutes; explain an execution plan
Microservices, Kafka, Redis
Ready when: Explain outbox, Saga and idempotent consumers with a failure scenario; configure a circuit breaker with reasons
Testing
Ready when: Write service, controller and exception tests with Mockito and MockMvc; explain test slices
LLD and HLD
Ready when: Complete two designs each in 45 minutes with requirements, data model, bottlenecks and trade-offs
Project and behavioral
Ready when: Deliver a 3-minute architecture walkthrough and six STAR stories, without notes
Mistake log
Revisit each entry after 1, 3, 7 and 21 days (spaced repetition). Any topic appearing three times in the log goes to the top of next week's plan.
| Date | Question or problem | What I answered | Correct answer and why | Topic # | Revisit on |
|---|---|---|---|---|---|
| … | … | … | … | … | … |
Weekly test
Every Sunday: 10 questions from the week's topics, 2 timed coding problems, and 1 spoken project question. Score yourself on correctness, depth, clarity, practical understanding and trade-offs. Below 6 on any topic means repeat it.
09
Week 1 daily plan: Core Java internals and hashing
Week 1 targets topics 1–14 and 15–16 plus the first DSA pattern. Weekdays are 2 hours, weekend days 4 hours.
| Day | Learn (40 min) | Answer aloud | Coding | Hands-on | Revision | Done when |
|---|---|---|---|---|---|---|
| Mon | JVM memory areas, class loading, JIT (topic 1); Lesson 1 part A | Where do objects, locals and class metadata live? What causes OutOfMemoryError vs StackOverflowError? | Reverse a string; reverse words | Run a small program with a small -Xmx, read the OOM output, take a heap dump with jcmd | Re-explain the memory diagram from a blank page | You draw the memory layout and name 3 causes of OOM |
| Tue | equals/hashCode, String pool, immutability (topics 3, 4, 14); Lesson 1 part B | Why override hashCode with equals? What breaks with mutable keys? | Two Sum; valid anagram | Write an immutable class and a broken mutable-key HashMap demo | Mistake-log entries so far | Demo reproduces a lost lookup and you explain it |
| Wed | HashMap internals (topic 5); Lesson 1 part C | Resize, load factor, treeification, why power-of-two capacity? | Find duplicates; first non-repeating character | Implement a minimal chained HashMap (exercise E3) | Flashcards for topics 1–5 | Your HashMap passes 10 test cases |
| Thu | ConcurrentHashMap, ArrayList vs LinkedList, Comparable vs Comparator (topics 6–8) | Why is HashMap unsafe under concurrency? CHM vs synchronizedMap? | Group anagrams; frequency sort | Sort a list of objects with a multi-key Comparator | Re-solve Tuesday's Two Sum without notes | Explain CHM bin locking in 2 minutes |
| Fri | Exceptions, generics and type erasure (topics 9–10) | Checked vs unchecked? What does type erasure prevent? | Subarray sum equals K (hashing) | Add a custom exception hierarchy to a small service | Mistake-log review | You write a generic method with bounded wildcards correctly |
| Sat | Interface vs abstract class, SOLID (topics 11–12); Streams: map, filter, flatMap, groupingBy (topics 15–16) | Give a SOLID violation from your own project and its fix | 5 Stream exercises (word count, group by, flatMap lists) | Refactor a small class set to Strategy and Open/Closed | Timed set: 3 easy problems in 45 min | Timed set done; Streams exercises pass |
| Sun | Weekly test, review, plan week 2 | Mock round 1: Core Java, 10 questions | 2 timed problems | Commit the week's code to Git | Update the scorecard and mistake log | Test average 6+; any topic under 6 is repeated Monday |
10
Final 7-day checklist
Counting down to interview day.
- Day 7Two full mock interviews (one coding, one Java/Spring); review all mistake-log entries
- Day 6Re-solve the 15 most-missed DSA problems from scratch
- Day 5SQL and Hibernate drill; reproduce N+1 and the slow-query fix from memory
- Day 4Record and refine the project walkthrough and the six behavioral stories
- Day 3Spring Boot internals and microservices failure scenarios, spoken aloud
- Day 2One design mock (LLD or HLD per target); skim flashcards
- Day 1Light revision only; environment and logistics check; sleep
11
Lesson 1: JVM memory, equals/hashCode, HashMap internals
The three topics interviewers use most to test depth (topics 1, 3, 4, 5): heap, stack and Metaspace; the equals/hashCode contract with a mutable-key bug you can reproduce; and HashMap put, resize and treeification. Includes 7 interview questions with follow-ups and 5 hands-on exercises.
Open the lesson →