Didi failed on three sides and summarized the Java interview questions. There are a few questions that I still don’t understand.

Preface

These are some of the knowledge points that I have learned and summarized in work and interviews. They are all typical questions that are often asked in interviews. If you don’t pay attention to summarizing, you may be confused when you are asked in an interview. Even if you know what the problem is, but you don’t sum it up carefully, you may be confused. Circumstance, and thus missed job opportunities.

Some knowledge points will be forgotten if I don’t use them often, but I will ask them during the interview. I also suffer a lot from this, so I decided to sort out the problems I encountered, share them, and help more people, so that we can make progress together.

In order to give everyone a clearer understanding of the content of the entire interview question, the editor has also directly compiled a mind map here.

As shown below;

Didi failed on three sides and summarized the Java interview questions. There are a few questions that I still don’t understand.

This article contains 200+ common Java interview questions (with analysis). As there are many interview questions, I suggest you collect them and answer them in detail.

The answer analysis method: After following + forwarding, private message keyword [ Interview Manual ] to obtain the analysis of the organized answer!

Didi failed on three sides and summarized the Java interview questions. There are a few questions that I still don’t understand.

1. If the hashCode() of two objects is the same, equals() must be true, right?

2. Is String a basic data type?

3. What are the classes for manipulating strings in Java? What is the difference between them?

4. What is the difference between JDK and JRE?

5. What is the difference between == and equals?

6. How much is Math. round(-1. 5) in Java?

7. What is the difference between a normal class and an abstract class?

8. How many types of IO streams are in Java?

9. Is String str="i" the same as String str=new String("i")?

10. What is the role of final in Java?

11. How to reverse the string?

12. What is the difference between BIO, NIO and AIO?

13. What are the commonly used methods of the String class?

14. What is the difference between an interface and an abstract class?

15. Can abstract classes use final modification?

16. Does an abstract class have to have abstract methods?

Didi failed on three sides and summarized the Java interview questions. There are a few questions that I still don’t understand.

17. How to use Iterator? What are the characteristics?

18. What is the difference between synchronized and ReentrantLock?

19. What executors does MyBatis have?

20. What is the difference between thread run() and start()?

21. What is the difference between the submit() and execute() methods in the thread pool?

22. Does the hibernate entity class have to have a parameterless constructor? why?

23. What is the difference between session and cookie?

24. How to achieve cross-domain?

25. Why is there a master node in the cluster?

26. Which collection classes are thread safe?

27. Are beans thread-safe in spring?

28. What is the difference between jedis and Redisson?

29. What is a dynamic agent? What are the applications?

30. Tell me about the transaction isolation of the database?

31. Kafka has set 7 days and 10G to clear data at the same time. By the fifth day, the message reached 10G. What will Kafka do at this time?

32. How does zookeeper ensure the synchronization of the master and slave nodes?

33. What ways can spring boot achieve hot deployment?

34. What are the ways to create threads?

35. What are the Java clients supported by Redis?

36. What is the difference between synchronized and volatile?

37. What should I pay attention to when using Kafka cluster?

38. Why use hibernate?

39. What are the statuses of the thread pool?

40. What is XSS *** and how to avoid it?

41. What is the role of vhost in RabbitMQ?

42. What is the difference between JSP and servlet?

43. Tell me about the JVM runtime data area?

44. What is the core configuration file of spring boot?

45. Can kafka be used separately from zookeeper? why?

46. ​​What are the commonly used engines for MySQL?

47. What is Iterator?

48. Tell me about hibernate's caching mechanism?

49. What is the difference between Array and ArrayList?

50. What are the Redis elimination strategies?

51. How many ways are there for Redis persistence?

52. What is a daemon thread?

53. What are the types of RabbitMQ nodes?

54. What is a deadlock?

55. What is the difference between throw and throws?

56. What are the conditions to ensure the success of message persistence?

57. What is the difference between HashMap and Hashtable?

58. What happens if the only disk node in the RabbitMQ cluster crashes?

59. Why does tcp need to shake hands for three times, can't it work twice? why?

60. How does Redis implement distributed locks?

61. Tell me about the principle of atomic?

62. How many types of broadcasts does RabbitMQ have?

63. Why is Redis single-threaded?

64. How to optimize MySQL performance?

65. What is the difference between poll() and remove() in Queue?

66. What is the difference between synchronized and Lock?

67. What is the difference between char and varchar?

68. Briefly describe the difference between tcp and udp?

69. How to decide whether to use HashMap or TreeMap?

70. Tell me about the underlying implementation principle of synchronized?

71. What is the difference between using Integer and int for mapping in hibernate?

72. What is zookeeper?

73. Tell me about the running process of spring mvc?

74. What is the difference between notify() and notifyAll()?

75. Tell me about the notification mechanism of zookeeper?

76. Tell me about the working principle of session?

77. What is the ORM framework?

78. Tell me about the design patterns you are familiar with?

79. What are the usage scenarios of RabbitMQ?

80. Can the session be used if the client prohibits cookies?

81. How to ensure the consistency of cache and database data?

82. Tell me about row locks and table locks in MySQL?

83. What is the parental delegation model?

84. What are the common performance problems of Redis? How to solve

85. What is the difference between #{} and ${} in MyBatis?

86. What is the role of @Autowired?

87. What is the difference between runnable and callable?

88. How to ensure the safe operation of multiple threads in a Java program?

89. How many paging methods does MyBatis have?

90. Redis distributed locks cannot solve the timeout problem. Distributed locks have a timeout period. If the execution of the program exceeds the lock timeout period, problems will occur.

Didi failed on three sides and summarized the Java interview questions. There are a few questions that I still don’t understand.

The answer analysis method: After following + forwarding, private message keyword [ Interview Manual ] to obtain the analysis of the organized answer!

91. What are the common methods of Files?

92. What is the difference between inner connection, left connection, and right connection of MySQL?

93. How are RabbitMQ messages sent?

94. What are the ways for spring to automatically assemble beans?

95. What is spring boot?

96. What is Redis? What are the usage scenarios?

97. How to realize the conversion between array and List?

98. What are the functions of zookeeper?

99. Tell me about Spring's transaction isolation?

100. Tell me how tcp sticky packets are generated?

What is the difference between 101, final, finally, finalize?

102. What is the difference between parallel and concurrency?

103. What is the difference between get and post requests?

104. What is ThreadLocal? What are the usage scenarios?

105. Does MyBatis support lazy loading? What is the principle of lazy loading?

106. What are the seven-layer models of OSI?

107. What is the principle of synchronized lock upgrade in multithreading?

108. What is the difference between ArrayList and LinkedList?

109. What is spring cloud?

110. How to avoid SQL injection?

111. What built-in objects does JSP have? What are the roles?

112. What are the important roles of RabbitMQ?

113. How to implement dynamic proxy?

114. How many query methods does hibernate have?

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

116. What are the main modules of spring?

117. What are the important components of RabbitMQ?

118. What are the Java containers?

119. Explain what aop is

120. What issues should be paid attention to when building a RabbitMQ cluster?

121. What is the role of @RequestMapping?

122. What is the difference between a simple factory and an abstract factory?

123. What is the difference between float and double?

124. What is Java serialization? Under what circumstances need serialization?

125. How many data retention strategies does Kafka have?

126. Tell me about the main components of JVM? And its role?

127. What is the difference between logical paging and physical paging in MyBatis?

128. How to judge whether the object can be recycled?

129. What is the difference between ArrayList and Vector?

130. What is the difference between getCurrentSession and openSession in hibernate?

131. What is the role of @Autowired?

132. What is the difference between jpa and hibernate?

133. How many deployment modes does zookeeper have?

134. Tell me about the implementation principle of HashMap?

135. Why use spring?

136. Tell me about the implementation principle of HashSet?

137. What are the three paradigms of the database?

138. What do the http response codes 301 and 302 represent? What's the difference?

139. What are the defects of Redis distributed locks?

140. How is the MySQL index implemented?

141. Tell me about the execution process of class loading?

142. What are the differences between MyBatis and hibernate?

143. Can hibernate entity classes be defined as final?

144. What are the methods for troubleshooting MySQL?

145. What are the common exception classes?

146 What are queues and stacks? What's the difference?

147. What is the difference between Collection and Collections?

148. How to ensure that a collection cannot be modified?

149. What is the difference between sleep() and wait()?

150. Talk about optimistic locking and pessimistic locking?

151. What are the components of spring mvc?

152. The difference between thread and process?

153. How to implement object cloning?

154. What are the ways to create a thread pool?

155. In try-catch-finally, if the catch is returned, will finally be executed?

156. Tell me about the difference between stacks?

157. Is RowBounds querying all results at once? why?

158. What conditions will cause Kafka to run slower?

159. What is the difference between Redis and memcache?

160. What is ACID?

161. How does RabbitMQ implement delayed message queues?

162. What types of spring boot configuration files are there? What is the difference between them?

163. What are the implementation methods of spring transactions?

164. How does hibernate work?

165. What is the difference between spring mvc and struts?

167. There are 3 servers in the cluster, and one of the nodes is down. Can zookeeper still be used at this time?

Didi failed on three sides and summarized the Java interview questions. There are a few questions that I still don’t understand.

168. What is cache penetration? How to deal with it?

169. What is the function of the spring cloud circuit breaker?

170. What is reflection?

171. What is the difference between forward and redirect?

172. What is the realization principle of the MyBatis paging plug-in?

173. What are the statuses of hibernate objects?

174. What are the disadvantages of RabbitMQ persistence?

175. How does RabbitMQ avoid message loss?

176. How to get the current database version?

177. What is CSRF *** and how to avoid it?

188. How to write a custom plug-in for MyBatis?

199. How many bean scopes does spring support?

200. Tell me about the implementation principle of JSONP?

201. How to view the printed SQL statement in the console in hibernate?

202. Explain what is ioc?

203. What status does the thread have?

204. What are the functions of Redis?

205. Why use cloning?

206. How does RabbitMQ ensure the stability of messages?

207. How to verify whether the MySQL index meets the requirements?

208. What is the use of RabbitMQ cluster?

209. Tell me about the primary cache and secondary cache of MyBatis?

210. What is the difference between Iterator and ListIterator?

211. What are the four scopes of JSP?

Didi failed on three sides and summarized the Java interview questions. There are a few questions that I still don’t understand.

212. Which part of try-catch-finally can be omitted?

213. Is each node of RabbitMQ a complete copy of other nodes? why?

214 What is the difference between List, Set and Map?

215. What data types does Redis support?

216. What is the difference between get() and load()?

217. Does RabbitMQ have any requirements for the stopping order of cluster nodes?

218. Why use spring boot?

219. How to prevent deadlock?

220. There are a total of 7 pieces of data in an auto-increment table, the last 2 pieces of data are deleted, the MySQL database is restarted, and another piece of data is inserted. What is the id at this time?

221. What are the commonly used injection methods for spring?

222. How does Redis optimize memory?

The answer analysis method: After following + forwarding, private message keyword [ Interview Manual ] to obtain the analysis of the organized answer!

Didi failed on three sides and summarized the Java interview questions. There are a few questions that I still don’t understand.

At last

This is the end of the study notes that the editor entered to share. Welcome everyone to communicate together. If you like the article, remember to follow me and like it, thank you for your support! The important thing is said three times, forward + forward + forward, be sure to remember to forward! !

Guess you like

Origin blog.51cto.com/14994509/2655163