30 November 2026 · 2 min read
Java & Spring Boot interview prep: from core concepts to system questions
What a modern Java backend interview covers — core language depth, Spring Boot, concurrency, and the design questions that separate mid from senior — with a focused prep plan.
A Java backend interview usually moves through four layers: core language, the framework (almost always Spring Boot), how you handle concurrency and performance, and a design discussion. Strong candidates are not the ones who memorise answers — they are the ones who can explain why, and keep answering the follow-up.
Core Java: expect depth, not trivia
- How does HashMap work internally, and what changed in Java 8? Follow-up: what makes a good
hashCode()andequals()? - Difference between checked and unchecked exceptions, and when you would create a custom exception.
- String, StringBuilder, StringBuffer — and why String is immutable.
- What are the key features you actually use from Java 8 through 21: streams, Optional, records, sealed classes, virtual threads?
Spring Boot: the questions that reveal real experience
- How does dependency injection work, and what is the difference between constructor and field injection (and why constructor injection is preferred)?
- Explain the request lifecycle of a Spring Boot REST call from the controller to the database and back.
- How do you handle transactions with
@Transactional, and what are the propagation and isolation levels? - How do you secure an API with Spring Security and JWT, and where does token validation happen?
- What is the N+1 query problem in JPA/Hibernate, how do you detect it, and how do you fix it?
Concurrency and performance
This is where senior roles are decided. Be ready for:
- The difference between
synchronized,ReentrantLockand atomic variables. - How a thread pool works and why you rarely create raw threads.
- How you would diagnose a service that is slow under load — thread dumps, heap usage, slow queries, connection pools.
The design round
For mid-to-senior roles you will be asked to design something small but real: a rate limiter, a URL shortener, an order service. Interviewers are watching how you clarify requirements, choose data models, and reason about trade-offs — not whether you reach a perfect answer.
A one-week prep plan
- Days 1–2: Core Java — collections, concurrency basics, the Java features you claim on your CV.
- Days 3–4: Spring Boot — build (or re-read) a small CRUD service and be able to explain every layer.
- Day 5: Two coding problems out loud, focusing on explaining your approach before writing.
- Days 6–7: One full mock interview covering all four layers, then fix whatever gaps it exposes.
The candidates who get offers are usually not the ones with the most facts — they are the ones who stay composed through the follow-up questions. Practice being questioned, not just answering.