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

220 Java Interview Questions for EPAM

The document contains a comprehensive list of over 220 Java interview questions focused on various topics such as Java fundamentals, object-oriented programming, exception handling, collections, multithreading, and advanced concepts related to frameworks and design patterns. It serves as a resource for self-practice and interview preparation for candidates, particularly those aiming for positions at EPAM. Additionally, it includes advanced questions that delve into specific Java features and modern development practices.

Uploaded by

Anil Uppalapati
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)
60 views5 pages

220 Java Interview Questions for EPAM

The document contains a comprehensive list of over 220 Java interview questions focused on various topics such as Java fundamentals, object-oriented programming, exception handling, collections, multithreading, and advanced concepts related to frameworks and design patterns. It serves as a resource for self-practice and interview preparation for candidates, particularly those aiming for positions at EPAM. Additionally, it includes advanced questions that delve into specific Java features and modern development practices.

Uploaded by

Anil Uppalapati
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

Java Interview Questions (220+ EPAM Focused)

Questions Only – For Self Practice & Interview Revision

Original 220 Java Questions

1. Why is Java so popular?


2. What is platform independence?
3. What is bytecode?
4. Compare JDK vs JVM vs JRE
5. What are the important differences between C++ and Java?
6. What is the role for a classloader in Java?
7. What are Wrapper classes?
8. Why do we need Wrapper classes in Java?
9. What are the different ways of creating Wrapper class instances?
10. What are differences in the two ways of creating Wrapper classes?
11. What is auto boxing?
12. What are the advantages of auto boxing?
13. What is casting?
14. What is implicit casting?
15. What is explicit casting?
16. Are all String’s immutable?
17. Where are String values stored in memory?
18. Why should you be careful about String concatenation(+) operator in loops?
19. How do you solve above problem?
20. What are differences between String and StringBuffer?
21. What are differences between StringBuilder and StringBuffer?
22. Can you give examples of different utility methods in String class?
23. What is a class?
24. What is an object?
25. What is state of an object?
26. What is behavior of an object?
27. What is the super class of every class in Java?
28. Explain about toString method?
29. What is the use of equals method in Java?
30. What are the important things to consider when implementing equals method?
31. What is the Hashcode method used for in Java?
32. Explain inheritance with examples.
33. What is method overloading?
34. What is method overriding?
35. Can super class reference variable can hold an object of sub class?
36. Is multiple inheritance allowed in Java?
37. What is an interface?
38. How do you define an interface?
39. How do you implement an interface?
40. Can you explain a few tricky things about interfaces?
41. Can you extend an interface?
42. Can a class extend multiple interfaces?
43. What is an abstract class?
44. When do you use an abstract class?
45. How do you define an abstract method?
46. Compare abstract class vs interface?
47. What is a constructor?
48. What is a default constructor?
49. Will this code compile?
50. How do you call a super class constructor from a constructor?
51. Will this code compile?
52. What is the use of this()?
53. Can a constructor be called directly from a method?
54. Is a super class constructor called even when there is no explicit call from a sub class
constructor?
55. What is polymorphism?
56. What is the use of instanceof operator in Java?
57. What is coupling?
58. What is cohesion?
59. What is encapsulation?
60. What is an inner class?
61. What is a static inner class?
62. Can you create an inner class inside a method?
63. What is an anonymous class?
64. What is default class modifier?
65. What is private access modifier?
66. What is default or package access modifier?
67. What is protected access modifier?
68. What is public access modifier?
69. What access types of variables can be accessed from a class in same package?
70. What access types of variables can be accessed from a class in different package?
71. What access types of variables can be accessed from a sub class in same package?
72. What access types of variables can be accessed from a sub class in different package?
73. What is the use of a final modifier on a class?
74. What is the use of a final modifier on a method?
75. What is a final variable?
76. What is a final argument?
77. What happens when a variable is marked as volatile?
78. What is a static variable?
79. Why should you always use blocks around if statement?
80. Guess the output question.
81. Guess the output question.
82. Guess the output of switch block.
83. Guess the output of switch block.
84. Should default be the last case in switch?
85. Can a switch be used with String?
86. For loop output question.
87. What is an enhanced for loop?
88. For loop output question.
89. Program output question.
90. Program output question.
91. Why is exception handling important?
92. What design pattern is used in exception handling?
93. What is the need for finally?
94. When is finally not executed?
95. Will finally be executed here?
96. Is try without catch allowed?
97. Is try without catch and finally allowed?
98. Explain exception class hierarchy.
99. Difference between error and exception.
100. Difference between checked and unchecked exceptions.
101. How do you throw an exception?
102. What happens when you throw checked exception?
103. What are options to handle checked exception?
104. How to create custom exception?
105. How to handle multiple exceptions in one block?
106. Explain try-with-resources
107. How does try-with-resources work?
108. Exception handling best practices?
109. What are default array values?
110. Enhanced for loop over array?
111. How to print array?
112. How to compare arrays?
113. What is enum?
114. Switch with enum?
115. What are varargs?
116. What are asserts?
117. When to use asserts?
118. What is garbage collection?
119. Explain garbage collection.
120. When is GC run?
121. GC best practices?
122. What are initialization blocks?
123. What is static initializer?
124. Instance initializer?
125. What is tokenizing?
126. Tokenizing example?
127. What is serialization?
128. How to serialize object?
129. How to deserialize?
130. Partial serialization?
131. Serialize object hierarchy?
132. Are constructors called during deserialization?
133. Are static variables serialized?
134. Why collections?
135. Important collection interfaces?
136. Important methods of Collection?
137. Explain List interface?
138. Explain ArrayList?
139. Duplicates in ArrayList?
140. Iterate ArrayList?
141. Sort ArrayList?
142. Sorting using Comparable?
143. Sorting using Comparator?
144. What is Vector?
145. Explain LinkedList?
146. Explain Set?
147. Set related interfaces?
148. Set vs SortedSet?
149. Set implementations?
150. What is HashSet?
151. What is LinkedHashSet?
152. What is TreeSet?
153. NavigableSet implementations?
154. Explain Queue?
155. Queue interfaces?
156. Explain Deque?
157. Explain BlockingQueue?
158. What is PriorityQueue?
159. BlockingQueue implementations?
160. Explain Map?
161. Map vs SortedMap?
162. What is HashMap?
163. HashMap methods?
164. TreeMap vs HashMap?
165. NavigableMap implementation?
166. Static methods of Collections class?
167. Synchronized vs concurrent collections?
168. New concurrent collections?
169. CopyOnWrite collections?
170. CompareAndSwap?
171. Lock vs synchronized?
172. Initial capacity?
173. Load factor?
174. UnsupportedOperationException?
175. Fail-fast vs fail-safe?
176. Atomic operations?
177. What is BlockingQueue?
178. What are Generics?
179. Why Generics?
180. Generic class?
181. Generic restrictions?
182. Bounded generics?
183. Super bounded generics?
184. Generic method?
185. Need for threads?
186. Creating threads?
187. Thread by extending Thread?
188. Thread using Runnable?
189. How to run thread?
190. Thread states?
191. Thread priority?
192. What is ExecutorService?
193. ExecutorService example?
194. Ways of creating ExecutorService?
195. How to check task execution?
196. What is Callable?
197. Thread synchronization?
198. Synchronized block?
199. Static synchronized?
200. join() method?
201. Important thread methods?
202. What is deadlock?
203. Inter-thread communication?
204. wait() usage?
205. notify() usage?
206. notifyAll() usage?
207. wait-notify example?
208. What is functional programming?
209. FP example?
210. What is Stream?
211. Explain Streams?
212. Terminal operations?
213. Method references?
214. Lambda expressions?
215. Lambda example?
216. Lambda & functional interface?
217. What is Predicate?
218. What is Function interface?
219. What is Consumer?
220. Multi-arg functional interfaces?

Additional EPAM-Level Advanced Questions

221. Difference between HashMap and ConcurrentHashMap?


222. Difference between synchronized and ReentrantLock?
223. What happens internally when you put value in HashMap?
224. Difference between Comparable and Comparator?
225. Explain Java Memory Model.
226. Difference between Stack and Heap memory?
227. What is Metaspace?
228. Difference between fail-fast and fail-safe with examples?
229. Difference between Runnable and Callable?
230. Difference between execute() and submit()?
231. Difference between Mono and Flux?
232. Explain Spring Bean lifecycle.
233. What is dependency injection?
234. Difference between @Component, @Service, @Repository?
235. Difference between REST and SOAP?
236. What is REST idempotency?
237. Difference between PUT and POST?
238. What is JWT?
239. What is OAuth2?
240. Microservices vs Monolith?
241. What is Circuit Breaker pattern?
242. What is API Gateway?
243. What is Docker?
244. Difference between Docker image and container?
245. What is Kubernetes?
246. CI/CD pipeline?
247. Blue-Green deployment?
248. Canary deployment?
249. What is Observability?
250. Difference between Log, Metric and Trace?

You might also like