-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathQuestions dump
More file actions
113 lines (103 loc) · 4.75 KB
/
Copy pathQuestions dump
File metadata and controls
113 lines (103 loc) · 4.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
1. Can we use a static method in a constructor?
2. What is the contract between hashCode() and equals() methods?
3. What is fail-fast iteration, and how do we resolve it?
4. What are virtual threads?
5. What are sealed classes?
6. What happens when there is a collision in HashMap?
7. What is multithreading? How is multithreading implemented in your project?
8. What is NullPointerException, and how is it handled?
9. Array vs List
10. Set vs List
11. Checked exceptions vs Unchecked exceptions
12. Thread vs Runnable
13. Abstract class vs Concrete class
14. HashMap vs TreeMap
15. ArrayList vs LinkedList
16. HashMap vs HashTable
17. Enum vs Constant variables
18. Garbage Collection vs Manual memory management
19. Lambda expressions vs Anonymous classes
20. Functional programming vs Object-oriented programming
21. Shallow Copy vs Deep Copy
Java Concurrency & Design Patterns
22. How can you design a thread-safe Singleton pattern in Java? Explain with an example.
23. What is ExecutorService in the Java Executor Framework? How does it enhance thread management?
24. Key differences between synchronized and ReentrantLock in Java? When to use each?
25. When a class implements multiple interfaces with conflicting default methods, how do you resolve the method conflicts?
Spring Framework & Spring Boot
26. What distinguishes ApplicationContext from BeanFactory in Spring?
27. How do you handle bean conflicts in a Spring application?
28. @RequestMapping vs @GetMapping
29. @PathVariable vs @RequestParam
30. @PostMapping vs @PutMapping
31. @Async vs @Scheduled
32. @Cacheable vs @CacheEvict
33. application.properties vs application.yml
34. How to handle "Service Not Found" error even when beans are properly registered?
35. DB @Bean vs @Autowired
Microservices Architecture
36. What are microservices, and how are they different from monoliths?
37. Key characteristics of microservice architecture
38. API Gateway & Service Discovery explained
39. How do microservices communicate? (REST/gRPC/Kafka)
40. Configuration management & stateless services
41. Circuit breaker pattern & Service Registry
42. Load balancing in microservices
43. Tools to know: Spring Boot, Docker, Kubernetes
44. What is a bounded context?
45. Why containers play a major role in microservices
46. How to design a microservice from scratch
47. Inter-service communication – REST vs Messaging
48. Circuit Breaker pattern using Resilience4j
49. Load balancing with Spring Cloud Load Balancer
50. Centralized config management with Spring Cloud Config
51. Service discovery – Eureka vs Consul
52. Feign Client vs WebClient – Use case comparison
53. Event-driven architecture and Kafka integration
54. Database per service vs Shared Database – Pros & cons
55. Saga Pattern for managing distributed transactions
56. JWT-based authentication & OAuth2 in microservices
57. API Gateway security best practices
58. Observability: Logging, tracing, monitoring essentials
59. Prometheus & Grafana for monitoring microservices
60. Kubernetes deployment strategies for microservices
61. Blue-Green & Canary deployments – when to use
62. When to use WebFlux for reactive microservices
63. CQRS & Event Sourcing – where and why to apply
Kafka
64. What is Apache Kafka, and why is it used?
65. What are the main components of Kafka?
66. What is a Kafka Topic and Partition?
67. What is a Kafka Broker?
68. What is a Kafka Consumer Group?
69. Role of Zookeeper in Kafka
70. How does Kafka ensure message durability & reliability?
71. Kafka vs Traditional Messaging Systems
72. What are delivery semantics: At-most-once, At-least-once, Exactly-once
73. How to start a Kafka server locally?
74. How to handle if a consumer keeps failing?
Databases & Hibernate
75. What are triggers in a database? Why are they used?
76. How to write a parameterized stored procedure in SQL Server?
77. What is SQL Injection? Best practices to prevent it in Spring Boot?
78. Lazy Loading vs Eager Loading in Hibernate – When to use each?
Testing & Mocking
79. What is @Mockito?
80. When and when not to use @Mock?
DevOps & CI/CD
81. How to debug in local and remote repositories?
82. How to create a pipeline and deploy in Jenkins?
83. JAR vs WAR files
84. Maven vs Gradle
85. Continuous Integration vs Continuous Deployment
Web & HTTP Concepts
86. What is Authentication vs Authorization?
87. What are HTTP error codes: 404, 402, 502, 503, 401?
88. What is the issue behind "Bad Request" error?
89. How to handle Gateway Timeout and Service Unavailable errors?
90. RESTful API vs SOAP API
Advanced Concepts
91. Reactive programming vs Imperative programming
92. How to ensure data consistency in distributed transactions in microservices?
93. What was a challenging issue you faced in microservices, and how did you resolve it?
94. How would you scale a microservice under traffic surge?