0% found this document useful (0 votes)
6 views8 pages

Java Coding Interview 250 Quick Dump

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)
6 views8 pages

Java Coding Interview 250 Quick Dump

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 Coding Interview – 250+ Quick Dump

1. Explain OOP principles in Java.

2. Difference between abstract class and interface.

3. What is method overloading vs overriding?

4. Difference between JDK, JRE, and JVM.

5. What is a constructor in Java?

6. Explain 'this' keyword in Java.

7. Explain 'super' keyword in Java.

8. What are static methods and variables?

9. Difference between static and non-static methods.

10. What are final, finally, and finalize in Java?

11. What is the difference between String, StringBuilder, and StringBuffer?

12. Why are Strings immutable in Java?

13. Explain wrapper classes in Java.

14. Difference between == and equals() in Java.

15. What is autoboxing and unboxing?

16. What are access modifiers in Java?

17. Explain transient and volatile keywords.

18. Explain serialization in Java.

19. What is cloning in Java?

20. What is the difference between shallow copy and deep copy?

21. Difference between Collection and Collections.

22. Explain List, Set, and Map interfaces.

23. Internal working of HashMap.

24. Difference between HashMap and Hashtable.

25. Difference between HashSet and TreeSet.

26. Explain fail-fast and fail-safe iterators.

27. What is ConcurrentHashMap?

28. Difference between ArrayList and LinkedList.

29. Explain internal working of HashSet.

30. Difference between TreeMap and HashMap.

31. What is a PriorityQueue in Java?

32. Explain Comparator vs Comparable.


33. What is a blocking queue?

34. Explain CopyOnWriteArrayList.

35. What are weak references and WeakHashMap?

36. Difference between Enumeration and Iterator.

37. Explain stack vs queue data structure in Java.

38. How does LinkedHashMap maintain order?

39. Explain IdentityHashMap.

40. What is NavigableMap in Java?

41. Explain the lifecycle of a thread in Java.

42. Difference between Thread and Runnable.

43. What is synchronization in Java?

44. Difference between synchronized method and block.

45. What is volatile in Java multithreading?

46. Explain deadlock with an example.

47. How to avoid deadlock?

48. What is livelock and starvation?

49. Explain ReentrantLock in Java.

50. Difference between wait(), notify(), and notifyAll().

51. What is ThreadLocal in Java?

52. Explain Callable and Future.

53. What is ExecutorService in Java?

54. Explain ScheduledExecutorService.

55. What is ForkJoinPool in Java?

56. Explain CompletableFuture.

57. What are atomic classes in Java?

58. Explain Semaphore in Java.

59. Explain CountDownLatch and CyclicBarrier.

60. Difference between parallelStream() and stream().

61. What are Java 8 functional interfaces?

62. Explain lambda expressions with an example.

63. What is a stream pipeline in Java 8?

64. Explain intermediate vs terminal operations in streams.

65. Difference between map() and flatMap().

66. What is Optional in Java 8?


67. Explain method references in Java 8.

68. Explain default and static methods in interfaces.

69. What is the use of Collectors class?

70. Difference between reduce() and collect().

71. What is the difference between findFirst() and findAny()?

72. Explain groupingBy() collector in streams.

73. Explain partitioningBy() in streams.

74. Explain parallel streams in Java 8.

75. What is [Link]() in Java 9?

76. Explain takeWhile() and dropWhile() in Java 9.

77. What is var keyword in Java 10?

78. Explain records in Java 14.

79. Explain sealed classes in Java 17.

80. What is switch expression in Java 12?

81. Difference between checked and unchecked exceptions.

82. What is try-with-resources?

83. Explain custom exceptions in Java.

84. What is throw vs throws?

85. Explain Error vs Exception.

86. What is OutOfMemoryError in Java?

87. Explain StackOverflowError.

88. What are suppressed exceptions?

89. What is multi-catch block in Java?

90. Explain NoClassDefFoundError vs ClassNotFoundException.

91. Explain JVM architecture.

92. What is JIT compiler in Java?

93. Explain garbage collection in Java.

94. Difference between heap and stack memory.

95. What are memory leaks in Java?

96. Explain strong, soft, weak, and phantom references.

97. What is classloader in Java?

98. Difference between static and dynamic class loading.

99. Explain metaspace in Java 8.

100. What are GC algorithms in Java?


101. What is Spring Boot?

102. Difference between Spring and Spring Boot.

103. What is dependency injection in Spring?

104. What are Spring Boot starters?

105. Explain Spring Boot auto-configuration.

106. What is @RestController annotation?

107. Difference between @Component, @Service, and @Repository.

108. What is @Autowired in Spring?

109. What is [Link] in Spring Boot?

110. Explain Spring Boot Actuator.

111. Explain OOP principles in Java.

112. Difference between abstract class and interface.

113. What is method overloading vs overriding?

114. Difference between JDK, JRE, and JVM.

115. What is a constructor in Java?

116. Explain 'this' keyword in Java.

117. Explain 'super' keyword in Java.

118. What are static methods and variables?

119. Difference between static and non-static methods.

120. What are final, finally, and finalize in Java?

121. What is the difference between String, StringBuilder, and StringBuffer?

122. Why are Strings immutable in Java?

123. Explain wrapper classes in Java.

124. Difference between == and equals() in Java.

125. What is autoboxing and unboxing?

126. What are access modifiers in Java?

127. Explain transient and volatile keywords.

128. Explain serialization in Java.

129. What is cloning in Java?

130. What is the difference between shallow copy and deep copy?

131. Difference between Collection and Collections.

132. Explain List, Set, and Map interfaces.

133. Internal working of HashMap.

134. Difference between HashMap and Hashtable.


135. Difference between HashSet and TreeSet.

136. Explain fail-fast and fail-safe iterators.

137. What is ConcurrentHashMap?

138. Difference between ArrayList and LinkedList.

139. Explain internal working of HashSet.

140. Difference between TreeMap and HashMap.

141. What is a PriorityQueue in Java?

142. Explain Comparator vs Comparable.

143. What is a blocking queue?

144. Explain CopyOnWriteArrayList.

145. What are weak references and WeakHashMap?

146. Difference between Enumeration and Iterator.

147. Explain stack vs queue data structure in Java.

148. How does LinkedHashMap maintain order?

149. Explain IdentityHashMap.

150. What is NavigableMap in Java?

151. Explain the lifecycle of a thread in Java.

152. Difference between Thread and Runnable.

153. What is synchronization in Java?

154. Difference between synchronized method and block.

155. What is volatile in Java multithreading?

156. Explain deadlock with an example.

157. How to avoid deadlock?

158. What is livelock and starvation?

159. Explain ReentrantLock in Java.

160. Difference between wait(), notify(), and notifyAll().

161. What is ThreadLocal in Java?

162. Explain Callable and Future.

163. What is ExecutorService in Java?

164. Explain ScheduledExecutorService.

165. What is ForkJoinPool in Java?

166. Explain CompletableFuture.

167. What are atomic classes in Java?

168. Explain Semaphore in Java.


169. Explain CountDownLatch and CyclicBarrier.

170. Difference between parallelStream() and stream().

171. What are Java 8 functional interfaces?

172. Explain lambda expressions with an example.

173. What is a stream pipeline in Java 8?

174. Explain intermediate vs terminal operations in streams.

175. Difference between map() and flatMap().

176. What is Optional in Java 8?

177. Explain method references in Java 8.

178. Explain default and static methods in interfaces.

179. What is the use of Collectors class?

180. Difference between reduce() and collect().

181. What is the difference between findFirst() and findAny()?

182. Explain groupingBy() collector in streams.

183. Explain partitioningBy() in streams.

184. Explain parallel streams in Java 8.

185. What is [Link]() in Java 9?

186. Explain takeWhile() and dropWhile() in Java 9.

187. What is var keyword in Java 10?

188. Explain records in Java 14.

189. Explain sealed classes in Java 17.

190. What is switch expression in Java 12?

191. Difference between checked and unchecked exceptions.

192. What is try-with-resources?

193. Explain custom exceptions in Java.

194. What is throw vs throws?

195. Explain Error vs Exception.

196. What is OutOfMemoryError in Java?

197. Explain StackOverflowError.

198. What are suppressed exceptions?

199. What is multi-catch block in Java?

200. Explain NoClassDefFoundError vs ClassNotFoundException.

201. Explain JVM architecture.

202. What is JIT compiler in Java?


203. Explain garbage collection in Java.

204. Difference between heap and stack memory.

205. What are memory leaks in Java?

206. Explain strong, soft, weak, and phantom references.

207. What is classloader in Java?

208. Difference between static and dynamic class loading.

209. Explain metaspace in Java 8.

210. What are GC algorithms in Java?

211. What is Spring Boot?

212. Difference between Spring and Spring Boot.

213. What is dependency injection in Spring?

214. What are Spring Boot starters?

215. Explain Spring Boot auto-configuration.

216. What is @RestController annotation?

217. Difference between @Component, @Service, and @Repository.

218. What is @Autowired in Spring?

219. What is [Link] in Spring Boot?

220. Explain Spring Boot Actuator.

221. Explain OOP principles in Java.

222. Difference between abstract class and interface.

223. What is method overloading vs overriding?

224. Difference between JDK, JRE, and JVM.

225. What is a constructor in Java?

226. Explain 'this' keyword in Java.

227. Explain 'super' keyword in Java.

228. What are static methods and variables?

229. Difference between static and non-static methods.

230. What are final, finally, and finalize in Java?

231. What is the difference between String, StringBuilder, and StringBuffer?

232. Why are Strings immutable in Java?

233. Explain wrapper classes in Java.

234. Difference between == and equals() in Java.

235. What is autoboxing and unboxing?

236. What are access modifiers in Java?


237. Explain transient and volatile keywords.

238. Explain serialization in Java.

239. What is cloning in Java?

240. What is the difference between shallow copy and deep copy?

241. Difference between Collection and Collections.

242. Explain List, Set, and Map interfaces.

243. Internal working of HashMap.

244. Difference between HashMap and Hashtable.

245. Difference between HashSet and TreeSet.

246. Explain fail-fast and fail-safe iterators.

247. What is ConcurrentHashMap?

248. Difference between ArrayList and LinkedList.

249. Explain internal working of HashSet.

250. Difference between TreeMap and HashMap.

251. What is a PriorityQueue in Java?

252. Explain Comparator vs Comparable.

253. What is a blocking queue?

254. Explain CopyOnWriteArrayList.

255. What are weak references and WeakHashMap?

256. Difference between Enumeration and Iterator.

257. Explain stack vs queue data structure in Java.

258. How does LinkedHashMap maintain order?

259. Explain IdentityHashMap.

260. What is NavigableMap in Java?

You might also like