Interview Compendiums
The Java and Spring Boot Interview Compendium
Interview Questions and Answers for Java and Spring Boot Developers
A practical backend interview reference covering modern Java and Spring Boot development.
About this book
The Java and Spring Boot Interview Compendium is a question-and-answer reference for backend developers preparing for Java and Spring Boot interviews, and for anyone who wants to explain the platform rather than only use it. It contains more than five hundred questions across fifteen chapters, and each answer goes past the definition to the mechanism behind it and the trade-off it carries, so that readers can reason about a question they have not seen before instead of reciting a memorized reply. Almost every answer is paired with a Java code listing.
The material is roughly two-thirds Java and one-third Spring. It begins with how the language evolved from Java 8 to Java 21, then works through fundamentals and object-oriented programming, collections and data structures, generics, lambdas, and streams, exception handling and annotations, concurrency, JVM internals and performance tuning, design patterns, and object-oriented design. The second half turns to Spring: the IoC container, dependency injection, and proxies; Spring Boot and REST APIs; persistence with JPA and Hibernate; testing with JUnit 5, Mockito, and Spring Boot test slices; and Spring Security, architecture, and deployment. The two halves are connected throughout, so the Spring chapters keep returning to the Java mechanisms they are built on.
The book is practical rather than tutorial. In the Java chapters the listings are, with few exceptions, complete programs with their own main method, and in the Spring chapters they are focused excerpts written against the real Spring, JPA, JUnit, and Spring Security APIs. Chapters mix core concepts with production scenarios such as diagnosing a memory or CPU problem, migrating a Java 8 and Spring Boot 2 service to Java 21 and Spring Boot 3, designing idempotent APIs, and deploying without downtime, and nearly every chapter ends with a section of coding challenges. Along the way the book builds a hash map, an LRU cache, a rate limiter, a connection pool, and a circuit breaker by hand.
Readers come away able to explain how equality, immutability, generics, the Java Memory Model, and garbage collection actually behave, to choose between collections and concurrency tools and state what each choice costs, and to use thread dumps, heap dumps, and GC logs to narrow down a problem. On the Spring side they should be able to describe what the container, its proxies, and auto-configuration do on their behalf, design REST APIs and persistence layers with pitfalls such as N+1 queries and lost updates in view, test at the right level, and discuss security, architecture, resilience, and deployment in terms of trade-offs.
It is written for developers who already work in Java, from mid-level engineers preparing for senior interview loops to Spring developers refreshing the platform beneath the framework, and it is not a first tutorial. The chapters can be read in order or consulted by topic, which makes the book useful both as a study plan and as a reference before a technical interview.
More books
-
Interview Compendiums
The React and TypeScript Interview Compendium
Interview Questions and Answers for React and TypeScript Developers
-
Interview Compendiums
The Python and Django Interview Compendium
Interview Questions and Answers for Python and Django Developers
-
Interview Compendiums
The Modern C++ and STL Interview Compendium
Interview Questions and Answers for Modern C++ Developers