0% found this document useful (0 votes)
2 views5 pages

Interview Questions - Java Backend

The document contains a comprehensive list of Java and Spring Boot interview questions focused on backend development, covering topics such as asynchronous mechanisms, microservices communication, REST API security, and memory management in Java. It also addresses design patterns, database interactions, and Spring Boot features for building scalable applications. This resource serves as a guide for preparing for technical interviews in Java and Spring Boot environments.

Uploaded by

sreenusubbu1995
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views5 pages

Interview Questions - Java Backend

The document contains a comprehensive list of Java and Spring Boot interview questions focused on backend development, covering topics such as asynchronous mechanisms, microservices communication, REST API security, and memory management in Java. It also addresses design patterns, database interactions, and Spring Boot features for building scalable applications. This resource serves as a guide for preparing for technical interviews in Java and Spring Boot environments.

Uploaded by

sreenusubbu1995
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Tapan Kumar Sahoo

Java, SpringBoot Microservices Interview Questions (Backend


Specific)
1. What is Asynchronus mecanism in Spring Boot and uses ?
2. Diffrence between Comparable vs Comparator ?
3. What's the Diffrence between finalize method and Finally block ?
4. How you handle Out Of Memory error in your Application in Production level ?
5. Tell me the diffrence between class loader and class .forname ?
6. What's String Builder and String Buffer ? Tell me the scenario where it's used in your Project
?
7. What's Generation Garbage collection ?
8. What's Java Serialization with Examples ?
9. Composition of Inheritance security ?
10. There is a mechanism in Java we are using which is avoid the Object to Bytestream in
Runtime.
What exactly is it and where you used in your project on which Scenario ?
11. How to Integrate REST Api ?
12. To secure a REST Api in Spring Boot what method you need to consider and Why ?
13. How does Spring Boot Auto-configuration works ? Can we override it ?
14. Tell me to scale an Spring Boot Application in high traffic, what spring boot features would
you leverage ?
15. How can you implement Redis merge conflicts ?
16. Tell me what DDL commands you used and tell me on the scenario give the architecture
design to fetch the batch processing data from your database ?
17. Write the query to find Second highest salary by using LIMIT ?

18. What's Synchronus communication in Microservices ?


19. How microservices communicate with each other by using synchronus mechanism ?
20. What features you have implemented on API Gateway ?
21. Tell me design Patterns in Java and which pattern you already used in your Project ?
22. What's SOLID principles in Java ?
23. How ACID Properties used fort the database and what exactly it's ?
24. Why using Super keyword in Java ? tell me the scenario where you used in your project ?
25. If Super and this keyword you used in method and at time of method invocation which one
will be priority(mean calling first and why) ?
26. What' Dimond shape problem in Java ? By using class can we achieve it ?

27. write the code for create custom Annotation in Spring Boot with an Example ?
28. What's caching in Spring Boot ? What steps need to follow for implement and what are the
Annotation is used for that ?
29. Spring boot provides internally caching mechanism. How you integrate in your spring based
application ?
29. How interservice communication happens in Microservices ? What are the various types ?
30. In spring boot how yoy customize in specific Auto-configuration ?
31. What exactly is doing ApplicationContext in spring ?
32. Then what is the diffrence ApplicationContext and @Bean Annotation ?
33. What are the diffrent Scopes available in Spring Boot ?
34. If we are changing from Singleton to Prototype , What will be happens ?
35. What's the diffrence between @SpringBootApplication and @EnableAutoConfiguration ?
36. What's the diffrence between Service registry and service discovery ? And how they work
with each other ?

37. What's Saga pattern in Microservices ?


38. What's the super classes of all Java classes ? In wchich package you can find it ? Tell me
the methods inside it ?
39. What are the OOPS concept you know tell me ?
40. There is a single class called Employee, by using that class how you can achieve
Inheritance and Polymorphism ?
41. In which scenario inside your project you used ArrayList and LinkedList ?
42. Diffrence between HashMap and ConcurrentHashMap ?
43. Do you know about vector ?
44. What is Volatile keyword in Java and what is it's uses ?
45. What is transient keyword in Java ?
46. Diffrence between String Builder and String Buffer ?
47. Diff. between equal() method and == operator ?
48. What's indexing in SQL ? How it works internally ?
49. For batch processing jobs what steps you are doing ?
50. Do you know how cron jobs will be working ?

51. What's the diffrence between Monolothic and Microservices Pattern ?


52. what are advantages is available in microservices which will be differntiate from a
monolothic Application ?
53. when to use Singleton design patterns ? What is factory design pattern and write the code ?
54. Write the code by taking user input and match it's Anagram or not ?
55. what' Predicate, Consumer and Supplier ? Explain me with writing the code as example ?
56. How can you achive 100 % Abstraction ? What mechanism you follow for that ?
57. For API documentation have you used Swagger , What exactly itat is ?
58. Why SpringBoot is preffered over other frameworks ?
59. what spring boot features help to Develop Microservices based Applications ?
60. Tell me the basic annotations that SpringBoot offers ?
61. What is spring boot dependancy management ?
62. How do you debugging in your application ?
63. How to disable a specific Auto- configuration class ?
64. How JOINS is working in the databases ?
65. What's Immutability in Java ?

67. What is the difference between synchronized method, synchronized block, and Lock API?
68. Explain Spring Boot Starter dependencies and how they simplify configuration ?
69. Difference between @Autowired and @Qualifier ?
70. How do you handle global exception handling in Spring Boot REST APIs ?
71. How do you implement Spring Boot profiles for different environments ?
72. How do you secure Spring Boot REST APIs using JWT/OAuth2 ?
73. Explain optimistic vs pessimistic locking in JPA ?
74. Explain lazy loading and how to avoid LazyInitializationException ?
75. How do you use pagination and sorting in Spring Data JPA ?
76. How does @OneToMany and @ManyToOne @OneToOne mapping work ?
77. What is DeadLock and LiveLock ?
78. What is the circuit breaker pattern and where do you use it ?
79. How do you handle configuration management across multiple services ?
80. Write a SQL query to find the second highest salary from an Employee table ?
81. How do you handle database connection pooling in Spring Boot ?
82. How would you optimize a slow-running SQL query ?
83. How to design a simple REST API to fetch last 10 transactions of a user ?

84. Difference between Abstract Class and Interface ?


85. Can we achieve multiple inheritance in Java ? How ?
86. Explain OOPs concepts with real-time examples ?
87. Difference between HashMap and ConcurrentHashMap ?
88. What is Java Stream API ? Give examples ?
89. How does Garbage Collection work in Java ?
90. Difference between Checked Exception & Unchecked Exception ?
91. Explain Spring Boot Auto Configuration ?
92. What are Spring Boot Starters ?
93. Difference between @Component, @Service, @Repository
94. How do you secure REST API in Spring Boot ?
95. What is Spring Boot Actuator ? Where have you used it ?
96. Difference between Monolithic vs Microservices Architecture
97. How do microservices communicate with each other ?
98. What is API Gateway ? Which one you used in yor application ?
99. Explain Circuit Breaker Pattern ?
100. How do you handle configuration management in Microservices ?
101. How to implement service discovery ?
102. What is difference between REST and gRPC ?
103. Explain Saga Pattern vs 2 Phase Commit ?
104. How to deploy Spring Boot microservices on AWS ?
105. What are different ways of externalizing configuration in Spring Boot ?
106. How do you monitor microservices in production ?
107. What is difference between SQL & NoSQL DB ? Which one used in your project ?
108. Explain CI/CD pipeline you worked on ?
109. How do you handle logging & tracing in distributed systems ?
110. What are the challenges you have faced in your project ?

Oracle Round L-2


================
111. What are the different memory areas managed by the JVM ?
112. What is the difference between Heap and Stack memory ?
113. What is the purpose of Metaspace in Java 8 and later ?
114. What is the Program Counter (PC) Register and why is it important ?
115. What is the Native Method Stack, and when is it used ?
116. How is memory allocated to threads in Java ?
117. What changes were introduced from PermGen to Metaspace ?
118. How does class loading impact memory usage ?
119. What is Garbage Collection in Java, and how does it work ?
120. What are the main types of Garbage Collectors in Java ?
121. What is the difference between minor GC and major (full) GC ?
122. What is the role of Eden, Survivor, and Tenured generations in GC ?
123. What is the G1 Garbage Collector, and how is it different from CMS ?
124. What are stop-the-world events, and how do they affect performance ?
125. How can you monitor and tune GC behavior ?
126. What is a GC root, and how does GC use it ?
127. What are common causes of an OutOfMemoryError?
128. What are the different types (Heap, Metaspace,)?
129. How do you identify and fix memory leaks?
130. What tools can analyze memory usage and leaks?
131. Can memory leaks happen without static variables?
132. How do you reduce GC pause times in high-throughput apps ?
133. What is object pooling, and how does it help memory ?
134. How does finalize() impact GC behavior ?
135. What are soft, weak, and phantom references ?
146. What is the Java Memory Model (JMM) ?
157. What is the happens-before relationship ?
168. How does memory work in multithreading ?
[Link] do volatile and synchronized affect consistency ?
180. How can poor thread usage cause memory visibility issues ?
181. How you deploy your Application in Production ?
182. What's Spring Bean LifeCycle ?
183. Diff. between JWT and OAUTH2 ?

You might also like