🚀 Mastering Java Core & Spring Boot: 50 Interview Questions You Must Know
Series for Java Interview
Breaking into a senior backend role often means facing a wall of Java + Spring Boot questions. Instead of rote memorization, let’s walk through 50 carefully curated questions that cover both the fundamentals of Java and the practicalities of Spring Boot.
I’ve split them into two parts: Java Core (30) and Spring Boot (20). Use this as a study guide, or even as a checklist before your next interview.
🟦 Part I: Java Core (30 Questions)
Java is the backbone of countless enterprise systems. To shine in interviews, you must be fluent in OOP concepts, collections, concurrency, memory model, and newer features (Streams, Optional, etc.).
🔹 OOP & Language Fundamentals
What are the differences between an interface and an abstract class?
Explain immutability in Java. How do you create an immutable class?
Difference between == and .equals()?
What is the difference between final, finally, and finalize()?
Why are Strings immutable in Java?
🔹 Memory & Garbage Collection
How does Java manage memory (stack vs heap)?
Explain garbage collection. What are strong, weak, soft, phantom references?
What is the Java Memory Model?
🔹 Exceptions & Keywords
Checked vs unchecked exceptions?
Use cases of the volatile keyword?
synchronized method vs synchronized block?
🔹 Collections & Data Structures
Difference between HashMap, LinkedHashMap, TreeMap?
How does ConcurrentHashMap work internally?
How does HashSet work?
Contract between hashCode() and equals()?
ArrayList vs LinkedList?
🔹 Concurrency & Multithreading
Difference between Callable and Runnable?
How does ExecutorService work?
Pass-by-value vs pass-by-reference in Java?
🔹 Modern Java Features
What is Optional?
Difference between stream() and parallelStream()?
What are functional interfaces? Examples?
🔹 Advanced Topics
How does ClassLoader work?
Reflection in Java and its use cases?
Shallow copy vs deep copy?
What are annotations? How do you create custom ones?
🟩 Part II: Spring Boot (20 Questions)
Spring Boot is the industry standard for building microservices and enterprise apps. You’ll often be tested on how well you know its auto-configuration, dependency injection, REST support, and security.
🔹 Core Spring Boot Concepts
Difference between Spring and Spring Boot?
How does auto-configuration work?
Role of application.properties / application.yml?
What is @SpringBootApplication vs @Configuration?
🔹 Dependency Injection & Beans
Difference between @Component, @Service, @Repository, @Controller?
What are bean scopes in Spring?
How do profiles work in Spring Boot?
🔹 Data & Persistence
What is Spring Data JPA? How does it simplify DB operations?
What is @Transactional and when would you use it?
🔹 REST APIs & Controllers
@RestController vs @Controller?
@RequestParam vs @PathVariable vs @RequestBody?
How does Spring Boot handle exception handling for REST?
🔹 Security & Deployment
How does Spring Security integrate with Spring Boot?
How would you secure REST APIs (JWT, OAuth2)?
How does Spring Boot manage embedded servers (Tomcat, Jetty, Undertow)?
How do Spring Boot starter dependencies work?
✨ Closing Thoughts
If you master these 50 questions, you’ll be well prepared for the majority of Java + Spring Boot interviews at top tech companies.
👉 My advice: Don’t just memorize answers. Try to implement small demos:
Build a REST API with Spring Boot
Experiment with ConcurrentHashMap under load
Write a custom annotation & process it with reflection
This way, when the interviewer asks, you’ll speak with real confidence — not theory.
EngineerPro là một trung tâm đào tạo các khóa học chuyên sâu dành cho các software engineer. Với 100% giảng viên đến từ các Big Tech như Google, Amazon, Shopee, TikTok, … EngineerPro đảm bảo chất lượng giảng dạy và lộ trình học tập rõ ràng, từ cơ bản đến nâng cao, giúp học viên tự tin ứng tuyển vào các vị trí software engineer trong ngành công nghệ này.
Thông tin liên hệ: