Interview Questions (6+ Years)
Interview Questions (6+ Years)
1. How would you design a scalable microservice in Java? What frameworks and tools
would you use?
2. Explain how Dependency Injection works in Spring. What are the benefits?
3. What are design patterns you’ve used in real-world Java applications?
4. Compare Monolith vs Microservices architecture from a Java developer’s
perspective.
5. How do you handle versioning in REST APIs with Spring Boot?
6. How do you detect and fix concurrency issues in a large Java application?
7. Explain Fork/Join Framework. How is it different from ExecutorService?
8. How would you implement a thread-safe LRU Cache in Java?
9. What tools do you use to monitor Java performance in production?
10. How do you reduce GC pauses in a high-performance Java application?
11. What is the difference between CMS, G1, and ZGC garbage collectors?
12. How do you perform JVM tuning for a high-throughput application?
13. Explain how Java memory is structured (Heap, Stack, Metaspace).
14. How do you diagnose OutOfMemoryError or StackOverflowError?
15. Explain the difference between reactive programming and traditional imperative
programming in Java.
16. What is the difference between CompletableFuture and Future?
17. How does Java handle backpressure in reactive systems?
18. Have you worked with Kafka or any message brokers in Java applications? Explain
your implementation.
19. What are some pitfalls of using reflection in Java?
20. What security practices do you follow in Java applications (e.g., input
validation, OWASP)?