Advanced Java Interview Study Guide for 5+ Years Experience
Quick Reference Table
Category Question Count
Core Java 20
Spring Boot 20
Microservices 20
Docker 20
Kubernetes 20
SQL 20
Core Java
1. Explain the memory model in Java and how it affects multithreading.
2. How does the JVM manage memory (Heap, Stack, Metaspace)?
3. What are the different types of class loaders in Java?
4. Explain the difference between equals() and hashCode().
5. How does Java handle synchronization and what are the best practices?
6. What is the difference between strong, weak, soft, and phantom references?
7. How does Java handle exception chaining?
8. What are the implications of using reflection in Java?
9. Explain the use of annotations and custom annotations.
10. What is the difference between composition and inheritance?
11. How do you implement immutability in Java?
12. What are functional interfaces and how are they used?
13. Explain method references and lambda expressions.
14. What is the role of the Optional class in Java 8+?
15. How does Java handle type erasure in generics?
16. What are the best practices for writing clean and maintainable Java code?
17. Explain the use of enums and their advanced features.
18. What are the differences between abstract classes and interfaces?
19. How do you handle memory leaks in Java applications?
20. What are the common pitfalls in Java multithreading?
Spring Boot
1. What is Spring Boot and how does it differ from Spring Framework?
2. Explain the Spring Boot auto-configuration mechanism.
3. How do you create a custom starter in Spring Boot?
4. What is the role of @SpringBootApplication annotation?
5. How does Spring Boot manage application properties?
6. Explain the use of profiles in Spring Boot.
7. How do you secure a Spring Boot application?
8. What is Spring Boot Actuator and how is it used?
9. How do you handle exceptions globally in Spring Boot?
10. Explain the use of CommandLineRunner and ApplicationRunner.
11. How do you configure a Spring Boot application for production?
12. What are the best practices for structuring a Spring Boot project?
13. How do you integrate Spring Boot with external systems (e.g., Kafka, RabbitMQ)?
14. What is the difference between @Component, @Service, and @Repository?
15. How do you test Spring Boot applications?
16. Explain the use of Spring Boot DevTools.
17. How do you implement caching in Spring Boot?
18. What is the role of Spring Boot starters?
19. How do you monitor and log in Spring Boot applications?
20. How do you deploy a Spring Boot application to a cloud platform?
Microservices
1. What are microservices and how do they differ from monolithic architecture?
2. How do you design a microservices architecture?
3. What are the challenges in microservices communication?
4. How do you handle service discovery in microservices?
5. What is the role of API Gateway in microservices?
6. How do you implement centralized configuration in microservices?
7. What are the common patterns in microservices (e.g., Circuit Breaker, Retry)?
8. How do you handle data consistency across microservices?
9. What is eventual consistency and how is it implemented?
10. How do you secure microservices communication?
11. What is service orchestration vs choreography?
12. How do you manage transactions in microservices?
13. What is the role of containers in microservices?
14. How do you monitor and trace microservices?
15. What are the best practices for deploying microservices?
16. How do you handle versioning in microservices APIs?
17. What is the role of service mesh in microservices?
18. How do you test microservices independently?
19. What are the common anti-patterns in microservices?
20. How do you scale microservices effectively?
Docker
1. What is Docker and how does it work?
2. How do you create and manage Docker containers?
3. What is the difference between Docker image and container?
4. How do you write an efficient Dockerfile?
5. What are Docker volumes and how are they used?
6. How do you manage environment variables in Docker?
7. What is Docker Compose and how is it used?
8. How do you optimize Docker image size?
9. What are the best practices for Docker security?
10. How do you handle logging in Docker containers?
11. What is the difference between ENTRYPOINT and CMD?
12. How do you debug a Docker container?
13. How do you manage multi-stage builds in Docker?
14. What is the role of Docker registry?
15. How do you update running containers with zero downtime?
16. How do you monitor Docker containers?
17. What are the common issues in Docker networking?
18. How do you handle persistent storage in Docker?
19. What is the difference between bind mount and volume?
20. How do you clean up unused Docker resources?
Kubernetes
1. What is Kubernetes and what problems does it solve?
2. Explain the architecture of Kubernetes.
3. What are Pods in Kubernetes?
4. How do you define and deploy a Deployment in Kubernetes?
5. What is a Service in Kubernetes?
6. How does Kubernetes handle scaling?
7. What is a ConfigMap and how is it used?
8. What is a Secret in Kubernetes?
9. How do you perform rolling updates in Kubernetes?
10. What is a StatefulSet and when would you use it?
11. How does Kubernetes handle service discovery?
12. What is a DaemonSet?
13. How do you monitor a Kubernetes cluster?
14. What is the role of etcd in Kubernetes?
15. How do you secure a Kubernetes cluster?
16. What is a Helm chart?
17. How do you manage persistent storage in Kubernetes?
18. What is the difference between ReplicaSet and Deployment?
19. How do you troubleshoot a failing pod?
20. What are Kubernetes namespaces and how are they used?
SQL
1. What is normalization and why is it important?
2. Explain different types of joins in SQL.
3. What is a subquery and how is it used?
4. How do you optimize SQL queries?
5. What are indexes and how do they work?
6. What is the difference between clustered and non-clustered indexes?
7. How do you handle transactions in SQL?
8. What is ACID property in databases?
9. How do you implement pagination in SQL?
10. What is the difference between DELETE, TRUNCATE, and DROP?
11. What are window functions in SQL?
12. How do you detect and resolve deadlocks in SQL?
13. What is the difference between WHERE and HAVING?
14. How do you enforce data integrity in SQL?
15. What is a stored procedure and when should you use it?
16. How do you handle many-to-many relationships in SQL?
17. What is the difference between UNION and UNION ALL?
18. How do you perform full-text search in SQL?
19. What are common performance tuning techniques in SQL?
20. How do you audit changes in a SQL database?