Assault gold nine silver ten! Master the Java architecture interview questions within 5 days, Ali Daniel will take you to get the Offer!

 Java basics:
1. What is the difference between JDK and JRE?

2. What is the difference between == and equals? == Interpretation

3. The hashCode() of the two objects is the same, so must equals() be true?

4. What is the role of final in Java?

5. What is Math. round(-1. 5) equal to in Java?

6. Is String a basic data type?

7. What classes are there for manipulating strings in Java? What's the difference between them?

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

9. How to reverse a string?

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

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

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

13. Can an abstract class be decorated with final?

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

15. How many types of IO streams are there in Java?

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

17. What are the common methods of Files?

For the answer, please move to:
Answer, just pick up the business card at the end of the text

Java container
18. What are the Java containers?

19. What is the difference between Collection and Collections?

20. What is the difference between List, Set, Map?

21. What is the difference between HashMap and Hashtable?

22. How to decide to use HashMap or TreeMap?

23. Tell me about the implementation principle of HashMap?

24. Tell me about the implementation principle of HashSet?

25. What is the difference between ArrayList and LinkedList?

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

27. What is the difference between ArrayList and Vector?

28. What is the difference between Array and ArrayList?

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

30. Which collection classes are thread safe?

31. What is iterator Iterator?

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

33. What is the difference between Iterator and ListIterator?

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

For the answer, please move to:
Answer, just pick up the business card at the end of the text

Java multithreading
35. What is the difference between parallelism and concurrency?

36. What is the difference between thread and process?

37. What is a daemon thread?

38. What are the ways to create threads?

39. What is the difference between runnable and callable?

40. What are the states of a thread?

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

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

44. What is the difference between run() and start() of a thread?

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

46. ​​What are the states of the thread pool?

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

48. How to ensure the safety of multi-threaded operation in Java programs?

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

50. What is deadlock?

51. How to prevent deadlock?

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

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

54. What is the difference between synchronized and volatile?

55. What is the difference between synchronized and Lock?

56. What is the difference between synchronized and ReentrantLock?

57. Tell me about the principle of atomic?

For the answer, please move to:
Answer, just pick up the business card at the end of the text

Java reflection
58. What is reflection?

59. What is Java serialization? When is serialization required?

60. What is a dynamic proxy? Application scenario?

61. How to implement dynamic proxy?

Answer, please move to:

Answer, you can get the business card at the end of the text

Object copy
62. Why use cloning?

63. How to implement object cloning?

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

Answer, please move to:

Answer, you can get the business card at the end of the text

javaweb
65. What is the difference between JSP and servlet? What are their characteristics?

66. What built-in objects does JSP have? What are the functions?

67. Tell me about the 4 scopes of JSP?

68. What is the difference between session and cookie?

69. Tell me about the working principle of session?

70. Assuming that the download client prohibits cookies, how to use the session? What is the difference between session and cookie?

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

72. How to avoid SQL injection?

73. What is an XSS attack and how to avoid it?

74. What is a CSRF attack and how to avoid it?

Answer, please move to:

Answer, you can get the business card at the end of the text

Java exception
75. The difference between throw and throws?

76. What is the difference between final, finally, and finalize?

77. Which part of try-catch-finally can be saved

78. In try-catch-finally, if there is a return in the catch, will finally still be executed?

79. What are the common exception classes?

Answer, please move to:

Answer, you can get the business card at the end of the text

Java network programming
80. What do the http response codes 301 and 302 represent? What's the difference?

81. What is the difference between forward and redirect?

82. Briefly describe the difference between tcp and udp?

83. Why does tcp need to shake hands three times, can't it be done twice? Why?

84. Tell me how the tcp sticky packet is generated?

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

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

87. How to implement cross-domain request?

88. Tell me about the implementation principle of JSONP?

Answer, please move to:

Answer, you can get the business card at the end of the text

Java design pattern
89. Please list several commonly used design patterns in JDK?

90. What is a design pattern? Have you used any design patterns in your code?

91. What is the singleton design pattern in Java? Please write a thread-safe singleton pattern in Java

92. In Java, what is the observer design pattern (observer design pattern)?

93. What is the main benefit of using the factory pattern? Where is it used?

94. Give a decorator design pattern implemented in Java? Does it operate at the object level or at the class level?

95. Why does ava programming not allow access to non-static variables from static methods?

96. If you need to design an ATM machine, what is your design idea?

97. In the Java language, when to use overloading and when to use rewriting?

98. Please give an example of when you are more inclined to use abstract classes instead of interfaces?

99. What is the difference between simple factory and abstract factory?

Answer, you can get the business card at the end of the text

renew:

Spring
100. Why use spring?

101. Explain what is Aop?

102. Explain what is ioc?

103. What are the main modules of spring?

104. What are the commonly used injection methods in spring?

105. Are beans in spring thread-safe?

106. How many bean scopes does spring support?

107. What are the ways to automatically assemble beans in spring?

108. What are the implementation methods of spring transactions?

109. Tell me about spring transaction isolation?

Answer, you can get the business card at the end of the text

Spring MVC
110. Tell me about the running process of spring mvc?

111. What are the components of spring mvc?

112. What is the role of @RequestMapping?

113. What is the role of @Autowired?

For answers, please click on the link:

For the answer, please click on the link: You can get the business card at the end of the article

SpringBoot
114. What is SpringBoot?

115. Why use Spring Boot?

116. What is the SpringBoot core configuration file?

117. What are the types of SpringBoot configuration files? What's the difference?

118. What are the ways of spring boot to achieve hot deployment?

119. What is the difference between jpa and hibernate?

Answer, you can get the business card at the end of the text

Spring Cloud
120. What is spring cloud?

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

122. What are the core components of spring cloud?

Answer, you can get the business card at the end of the text

Hibernate
123. Why use hibernate?

124. What is an ORM framework?

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

126. How many query methods does hibernate have?

127. Can hibernate entity class be defined as final?

128. Entity classes in hibernate use int and Integer to distinguish

129. How does hibernate work?

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

131. Tell me about the caching mechanism of hibernate?

132. What are the states of hibernate objects?

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

134. Do hibernate entity classes have to have a parameterless constructor? Why?

Answer, you can get the business card at the end of the text

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

136. How many paging methods does MyBatis have?

137. Does RowBounds query all results at once? Why?

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

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

140. Tell me about the first-level cache and second-level cache of MyBatis?

141. What are the differences between MyBatis and hibernate?

142. What Executors does MyBatis have?

143. What is the implementation principle of the MyBatis pagination plugin?

144. How does MyBatis write a custom plugin?

Answer, you can get the business card at the end of the text

RabbitMQ
145. What are the usage scenarios of RabbitMQ?

146. What are the important roles of RabbitMQ?

147. What are the important components of RabbitMQ?

148. What is the role of vhost in RabbitMQ?

149. How are RabbitMQ messages sent?

150. How does RabbitMQ ensure the stability of messages?

151. How does RabbitMQ avoid message loss?

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

153. What are the disadvantages of RabbitMQ persistence?

154. How many broadcast types does RabbitMQ have?

155. How does RabbitMQ implement a delayed message queue?

156. What is the use of RabbitMQ cluster?

157. What are the types of RabbitMQ nodes?

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

159. Is each node of RabbitMQ a complete copy of other nodes? Why?

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

161. Does RabbitMQ have any requirements for the stop order of cluster nodes?

Answer, you can get the business card at the end of the text

Kafka
162. Can kafka be used independently of zookeeper? Why?

163. How many data retention strategies does kafka have?

164. Kafka has set 7 days and 10G to clear data at the same time. By the fifth day, the message reached 10G. How will Kafka handle it at this time?

165. How to set kafka topic data storage time

166. What will cause kafka to run slowly?

167. What should be paid attention to when using Kafka cluster?

Answer, you can get the business card at the end of the text

Zookeeper
168. What is zookeeper?

169. What functions does zookeeper have?

170. How many deployment modes does zookeeper have?

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

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

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

174. Tell me about the notification mechanism of zookeeper?

175. What is the connection and difference between ZAB and Paxos algorithm?

Answer, you can get the business card at the end of the text

MySQL
176. What are the three paradigms of the database?

177. There are a total of 7 pieces of data in an auto-increment table, delete the last 2 pieces of data, restart the MySQL database, and insert another piece of data, what is the id at this time?

178. How to get the current database version?

179. Tell me what is ACID?

180. What is the difference between char and varchar?

181. What is the difference between float and double?

182. What is the difference between inner join, left join and right join in MySQL?

183. How is the MySQL index implemented?

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

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

186. Tell me about the engines commonly used in MySQL?

187. Tell me about MySQL's row locks and table locks?

188. Talk about optimistic locking and pessimistic locking?

189. What are the methods for troubleshooting MySQL problems?

190. How to optimize the performance of MySQL?

Answer, you can get the business card at the end of the text

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

192. What functions does Redis have?

193. What is the difference between Redis and memcache?

194. Why is Redis single-threaded?

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

196. What data types does Redis support?

197. What are the Java clients supported by Redis?

198. What is the difference between jedis and Redisson?

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

200. How many ways are there for Redis persistence?

201. How does Redis implement distributed locks?

202. What are the defects of Redis distributed locks?

203. How does Redis do memory optimization?

204. What are the Redis elimination strategies?

205. Why is single-threaded Redis so fast

Answer, you can get the business card at the end of the text

JVM
206. Tell me about the main components of the JVM? and its role?

207. Tell me about the JVM runtime data area?

208. Tell me about the difference between stacks?

209. What are queues and stacks? What's the difference?

210.What is the parental delegation model?

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

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

213. What are the reference types in Java?

214. Tell me what garbage collection algorithms does the JVM have?

215. Tell me what kind of garbage collectors does the JVM have?

216. Describe the CMS garbage collector in detail?

217. What are the new generation garbage collector and the old generation garbage collector? What's the difference?

218. Briefly describe how the generational garbage collector works?

219. Tell me about the JVM tuning tools?

220. What are the commonly used JVM tuning parameters?

Answer, you can get the business card at the end of the text

Guess you like

Origin blog.csdn.net/BASK2312/article/details/132668847