Java + Spring Boot + Microservices Interview Prep Guide
🔹 Core Java
1 Difference between HashMap, ConcurrentHashMap, and Hashtable
1️⃣
👉 Detailed Answer: Refer to guide above for in-depth explanation.
2️⃣Explain Garbage Collection (CMS vs G1 GC)
👉 Detailed Answer: Refer to guide above for in-depth explanation.
3️⃣Difference between synchronized, ReentrantLock, and ReadWriteLock
👉 Detailed Answer: Refer to guide above for in-depth explanation.
4️⃣Difference between Comparable vs Comparator
👉 Detailed Answer: Refer to guide above for in-depth explanation.
5️⃣Explain Java memory model (Heap, Stack, Metaspace)
👉 Detailed Answer: Refer to guide above for in-depth explanation.
6️⃣How does volatile work internally?
👉 Detailed Answer: Refer to guide above for in-depth explanation.
7️⃣Difference between wait(), sleep(), join()
👉 Detailed Answer: Refer to guide above for in-depth explanation.
8️⃣How to resolve deadlock, starvation, livelock
👉 Detailed Answer: Refer to guide above for in-depth explanation.
9️⃣How do you make a class immutable?
👉 Detailed Answer: Refer to guide above for in-depth explanation.
🔟 Best practices for checked vs unchecked exceptions
👉 Detailed Answer: Refer to guide above for in-depth explanation.
🔹 Spring & Spring Boot
1️⃣1️⃣Explain the Spring Bean lifecycle
👉 Detailed Answer: Refer to guide above for in-depth explanation.
1️⃣2️⃣Difference between @Component, @Service, @Repository, @Controller
👉 Detailed Answer: Refer to guide above for in-depth explanation.
1️⃣3️⃣How does Spring Boot auto-configuration work?
👉 Detailed Answer: Refer to guide above for in-depth explanation.
1️⃣4️⃣Role of Spring Boot Starter dependencies
👉 Detailed Answer: Refer to guide above for in-depth explanation.
1️⃣5️⃣How to configure profiles in Spring Boot?
👉 Detailed Answer: Refer to guide above for in-depth explanation.
1️⃣6️⃣Explain Spring Security (Authentication vs Authorization)
👉 Detailed Answer: Refer to guide above for in-depth explanation.
1️⃣7️⃣How to implement JWT Authentication?
👉 Detailed Answer: Refer to guide above for in-depth explanation.
1️⃣8️⃣Difference between @RestController vs @Controller
👉 Detailed Answer: Refer to guide above for in-depth explanation.
1️⃣9️⃣How to resolve circular dependencies in Spring?
👉 Detailed Answer: Refer to guide above for in-depth explanation.
20Explain @Transactional usage and propagation
2️⃣
0️⃣
👉 Detailed Answer: Refer to guide above for in-depth explanation.
🔹 JPA / Hibernate
2️⃣1️⃣Difference between Lazy vs Eager fetching
👉 Detailed Answer: Refer to guide above for in-depth explanation.
2️⃣2️⃣What is the N+1 select problem and how to fix it?
👉 Detailed Answer: Refer to guide above for in-depth explanation.
2️⃣3️⃣Difference between merge(), persist(), saveOrUpdate()
👉 Detailed Answer: Refer to guide above for in-depth explanation.
2️⃣4️⃣Explain 1st level vs 2nd level cache
👉 Detailed Answer: Refer to guide above for in-depth explanation.
2️⃣5️⃣How do you implement optimistic vs pessimistic locking?
👉 Detailed Answer: Refer to guide above for in-depth explanation.
2️⃣6️⃣How to handle batch inserts/updates?
👉 Detailed Answer: Refer to guide above for in-depth explanation.
2️⃣7️⃣How to write custom queries in Spring Data JPA?
👉 Detailed Answer: Refer to guide above for in-depth explanation.
🔹 Microservices & Architecture
2️⃣8️⃣What are 12-factor app principles?
👉 Detailed Answer: Refer to guide above for in-depth explanation.
2️⃣9️⃣How do microservices communicate (REST, gRPC, Messaging)?
👉 Detailed Answer: Refer to guide above for in-depth explanation.
3️⃣0️⃣How to implement service discovery (Eureka, Consul)?
👉 Detailed Answer: Refer to guide above for in-depth explanation.
3️⃣1️⃣Explain API Gateway pattern
👉 Detailed Answer: Refer to guide above for in-depth explanation.
3️⃣2️⃣How to handle distributed transactions?
👉 Detailed Answer: Refer to guide above for in-depth explanation.
3️⃣3️⃣Difference between Monolithic vs Microservices
👉 Detailed Answer: Refer to guide above for in-depth explanation.
3️⃣4️⃣How to manage configurations (Spring Cloud Config, Vault)?
👉 Detailed Answer: Refer to guide above for in-depth explanation.
3️⃣5️⃣How to implement circuit breaker & rate limiting (Resilience4j, Hystrix)?
👉 Detailed Answer: Refer to guide above for in-depth explanation.
3️⃣6️⃣Difference between synchronous vs asynchronous communication
👉 Detailed Answer: Refer to guide above for in-depth explanation.
3️⃣7️⃣How do you ensure idempotency in REST APIs?
👉 Detailed Answer: Refer to guide above for in-depth explanation.
🔹 System Design
3️⃣8️⃣Design a high-availability payment system
👉 Detailed Answer: Refer to guide above for in-depth explanation.
3️⃣9️⃣Design a low-latency stock trading API
👉 Detailed Answer: Refer to guide above for in-depth explanation.
4️⃣0️⃣How to isolate a frequently failing microservice?
👉 Detailed Answer: Refer to guide above for in-depth explanation.
4️⃣1️⃣How to ensure backward compatibility in APIs?
👉 Detailed Answer: Refer to guide above for in-depth explanation.
4️⃣2️⃣How to scale a Spring Boot service for 1M+ users
👉 Detailed Answer: Refer to guide above for in-depth explanation.