Borrow flowers to offer Buddha! My friend has been working as a Java interviewer for 5 years, and shared with me a Java interview question that interviewers like to ask

Because of job changes, I began to be responsible for recruiting some technical personnel for the group. Out of my responsibility to the company and to be better qualified for the position of technical manager, my friend did a lot of "homework" in the interview. First, I studied the interview questions of almost all major companies. I also discussed in detail the knowledge points involved in Java interviews with a few friends who are in charge of recruitment. So there are more than 200 interview questions that everyone sees today.

Why are these interview questions open?
Reason 1: There are more and more people engaged in Java development. My cousins, cousins ​​of friends, cousins ​​of friends of friends, every time I ask me for the same interview review materials, I have I was struggling to deal with it, so I sorted it out and sent the link directly to them.

Reason 2: To save time for both recruiting parties. Some people come to the company to interview, whether they have several years of work experience or just graduated, even these most basic interview questions can’t be done, which is really regrettable. As the saying goes, "How can you sweep the world without sweeping a house" is the same. If you don't even understand the basic concepts, how can you convince the interviewer that you can write high-quality programs? Rather than wasting each other's time, it is better to take some time to master your basic knowledge.

Reason 3: Improve the overall competence model of Java practitioners so that outstanding people can "emerge". Having these interview questions does not mean that you can enter the company after rote memorization, especially for jobs such as BAT. The competition is more intense. These interview questions can only become an "appetizer" in the interview system, thus improving the whole The barriers of Java interviews make those who are willing to learn to become more excellent, thereby opening up the gap with lazy people, making it easier for companies to identify them.

What do these interview questions contain?
Borrow flowers to offer Buddha! My friend has worked as a Java interviewer for 5 years and shared with me a Java interview question that interviewers love to ask. This interview question contains 19 modules: Java basics, container, multithreading, reflection, object copy, Java Web , Exception, Network, Design Pattern, Spring/Spring MVC, Spring Boot/Spring Cloud, Hibernate, Mybatis, RabbitMQ, Kafka, Zookeeper, MySql, Redis, JVM, etc., free download speed channel: click [full set of JAVA interview set] +[Java advanced core knowledge set] as shown below:)
Insert picture description here

The pain point to be solved by this
interview question is scarcity. It provides a realistic and comprehensive interview collection, including 200+ interview questions.
Authoritativeness solves the problem that the answers on the market are too old or even wrong.
Authenticity, this interview question is commonly used by companies and will not deviate from reality.
Easy to understand, easy to understand and clear, some interview questions include topic analysis and code examples, so that Xiaobai can also understand.
Save time, shield invalid repetitive information, and save search time for those who really need interview questions.
Suitable for reading crowd
: Junior/middle/senior Java programmers to be interviewed. Those
who
want to continue to improve and expand their Java technology stack.
Java Interviewer Interview
Questions
I. Java Basics
1. What is the difference between JDK and JRE?
2. What is the difference between == and equals?
3. If the hashCode() of two objects is the same, equals() must also be true, right?
4. What is the role of final in java?
5. How much is Math.round(-1.5) in java?
6. Is String a basic data type?
7. What are the classes of manipulation strings in java? What is the difference between them?
8. Is String str="i" the same as String str=new String("i")?
9. How to reverse the string?
10. What are the commonly used methods of the String class?
11. Does an abstract class have to have abstract methods?
12. What are the differences between ordinary and abstract classes?
13. Can abstract classes use final modification?
14. What is the difference between an interface and an abstract class?
15. How many types of IO streams are in java?
16. What is the difference between BIO, NIO and AIO?
17. What are the common methods of Files?

2. Container
18. What are the java containers?
19. What is the difference between Collection and Collections?
20. What is the difference between List, Set and Map?
21. What is the difference between HashMap and Hashtable?
22. How to decide whether 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?
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?

3. Multithreading
35. What is the difference between parallel and concurrency?
36. 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 statuses of threads?
41. What is the difference between sleep() and wait()?
42. What is the difference between notify() and notifyAll()?
43. What is the difference between thread run() and start()?
44. What are the ways to create a thread pool?
45. What are the statuses of the thread pool?
46. ​​What is the difference between submit() and execute() methods in thread pool?
47. How to ensure the safe operation of multiple threads in a java program?
48. What is the upgrade principle of multithreaded locks?
49. What is a deadlock?
50. How to prevent deadlock?
51. What is ThreadLocal? What are the usage scenarios?
52. Tell me about the underlying implementation principle of synchronized?
53. What is the difference between synchronized and volatile?
54. What is the difference between synchronized and Lock?
55. What is the difference between synchronized and ReentrantLock?
56. Tell me about the principle of atomic?

Fourth, reflection
57. What is reflection?
58. What is java serialization? Under what circumstances need serialization?
59. What is a dynamic agent? What are the applications?
60. How to implement dynamic proxy?

5. Object copy
61. Why use cloning?
62. How to implement object cloning?
63. What is the difference between deep copy and shallow copy?

6.
What is the difference between Java Web 64.jsp and servlet?
What built-in objects does 65.jsp have? What are the roles?
66. What are the 4 scopes of jsp?
67. What is the difference between session and cookie?
68. Tell me about the working principle of session?
69. Can the session be used if the client prohibits cookies?
70. What is the difference between spring mvc and struts?
71. How to avoid sql injection?
72. What is XSS attack and how to avoid it?
73. What is a CSRF attack and how to avoid it?

Seven, exception
74. The difference between throw and throws?
75. What is the difference between final, finally, finalize?
76. Which part of try-catch-finally can be omitted?
77. In try-catch-finally, if the catch is returned, will finally be executed?
78. What are the common exception classes?

8.
What do the network 79.http response codes 301 and 302 represent? What's the difference?
80. The difference between forward and redirect?
81. Briefly describe the difference between tcp and udp?
82. Why does tcp need to shake hands for three times? why?
83. Talk about how tcp sticky packets are generated?
84. What are the seven-layer models of OSI?
85. What is the difference between get and post request?
86. How to achieve cross-domain?
87. Tell me about the implementation principle of JSONP?

Nine, design patterns
88. Tell me about the design patterns you are familiar with?
89. What is the difference between a simple factory and an abstract factory?

10. Spring/Spring MVC
90. Why use spring?
91. Explain what is aop?
92. Explain what is ioc?
93. What are the main modules of spring?
94. What are the common injection methods of spring?
95. Are beans in spring thread safe?
96. What kind of bean scope does spring support?
97. What are the ways for spring to automatically assemble beans?
98. What are the spring transaction implementation methods?
99. Talk about spring transaction isolation?
100. Tell me about the running process of spring mvc?
101. What are the components of spring mvc?
102. What is the role of @RequestMapping?
103. What is the role of @Autowired?

11. Spring Boot/Spring Cloud
104. What is spring boot?
105. Why use spring boot?
106. What is the spring boot core configuration file?
107. What types of spring boot configuration files are there? What is the difference between them?
108. What ways can spring boot achieve hot deployment?
109. What is the difference between jpa and hibernate?
110. What is spring cloud?
111. What is the function of spring cloud circuit breaker?
112. What are the core components of spring cloud?

12. Hibernate
113. Why use hibernate?
114. What is the ORM framework?
115. How to view the printed sql statement in the console in hibernate?
116. How many query methods does hibernate have?
117. Can hibernate entity classes be defined as final?
118. What is the difference between using Integer and int for mapping in hibernate?
119. How does hibernate work?
120. The difference between get() and load()?
121. Tell me about hibernate's caching mechanism?
122. What are the statuses of hibernate objects?
123. What is the difference between getCurrentSession and openSession in hibernate?
124. Does hibernate entity class have to have a parameterless constructor? why?

13.
What is the difference between #{} and ${} in Mybatis 125.mybatis?
126. How many paging methods does mybatis have?
127. Is RowBounds query all results at once? why?
128. What is the difference between logical paging and physical paging in mybatis?
129. Does mybatis support lazy loading? What is the principle of lazy loading?
130. Tell me about the first level cache and second level cache of mybatis?
131. What are the differences between mybatis and hibernate?
132. What executors does mybatis have?
133. What is the realization principle of mybatis paging plug-in?
134. How does mybatis write a custom plug-in?

14.
What are the usage scenarios of RabbitMQ 135.rabbitmq?
136. What are the important roles of rabbitmq?
137. What are the important components of rabbitmq?
138. What is the role of vhost in rabbitmq?
139. How are rabbitmq's messages sent?
140. How does rabbitmq ensure the stability of the message?
141. How does rabbitmq avoid message loss?
142. What are the conditions to ensure the success of message persistence?
143. What are the disadvantages of rabbitmq persistence?
144. How many types of broadcasts does rabbitmq have?
145. How does rabbitmq implement a delayed message queue?
146. What is the use of rabbitmq cluster?
147. What are the types of rabbitmq nodes?
148. What issues should be paid attention to when constructing rabbitmq cluster?
149. Rabbitmq Is each node a complete copy of other nodes? why?
150. What happens if the only disk node in the rabbitmq cluster crashes?
151. Does rabbitmq have any requirements for the stopping order of cluster nodes?

15.
Can Kafka 152.kafka be used separately from zookeeper? why?
153. How many data retention strategies does Kafka have?
154. 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 this?
155. What circumstances will cause Kafka to run slower?
156. What should I pay attention to when using Kafka cluster?

16. Zookeeper
157. What is zookeeper?
158. What are the functions of zookeeper?
159. How many deployment modes does zookeeper have?
160. How does zookeeper ensure the synchronization of the master and slave nodes?
161. Why is there a master node in the cluster?
162. There are 3 servers in the cluster and one of the nodes is down. Can zookeeper still be used at this time?
163. Tell me about the notification mechanism of zookeeper?

17. MySql
164. What are the three paradigms of databases?
165. 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?
166. How to obtain the current database version?
167. What is ACID?
What is the difference between 168.char and varchar?
169. What is the difference between float and double?
170. What is the difference between inner connection, left connection and right connection of mysql?
171. How is the mysql index implemented?
172. How to verify whether the mysql index meets the demand?
173. Talk about the transaction isolation of the database?
174. Tell me about the engines commonly used in mysql?
175. Talk about the row lock and table lock of mysql?
176. Talk about optimistic locking and pessimistic locking?
177. What are the methods for mysql troubleshooting?
178. How to optimize the performance of mysql?

18. Redis
179. What is redis? What are the usage scenarios?
180. What are the functions of redis?
181. What is the difference between redis and memecache?
182. Why is redis single-threaded?
183. What is cache penetration? How to deal with it?
184. What data types does redis support?
185. What are the java clients supported by redis?
186. What is the difference between jedis and redisson?
187. How to ensure the consistency of cache and database data?
188. How many ways are there for redis persistence?
189. How does redis implement distributed locks?
190. What are the defects of redis distributed lock?
191. How does redis optimize memory?
192. What are the redis elimination strategies?
193. What are the common performance problems of redis? How to solve it?

19. JVM
194. What are the main components of JVM ? And its role?
195. Tell me about the jvm runtime data area?
196. Tell me about the difference between stacks?
197. What are queues and stacks? What's the difference?
198. What is the parent delegation model?
199. Tell me about the execution process of class loading?
200. How to judge whether the object can be recycled?
What are the reference types in 201.java?
202. Tell me about what garbage collection algorithms does jvm have?
203. What garbage collectors does jvm have?
204. Tell me more about the CMS garbage collector?
205. What are the new generation garbage collectors and the old generation garbage collectors? What's the difference?
206. Briefly describe how the generational garbage collector works?
207. Tell me about the jvm tuning tool?
208. What are the commonly used jvm tuning parameters?
Due to space limitations, the answer cannot be fully displayed. The original free download speed channel: Click [Full set of JAVA interview collection] + [Java advanced core knowledge collection]
Insert picture description here

More: click here! ! Get more learning materials!
Contains: JVM, JAVA collection, network, JAVA multi-threaded concurrency, JAVA basics, Spring principles, microservices, Zookeeper, Kafka, RabbitMQ, Hbase, MongoDB, Cassandra, design patterns, load balancing, database, consistent hashing, JAVA algorithm , Data structure, encryption algorithm, distributed cache, etc.
Insert picture description here

Fast transmission channel for notes in the article—click— my study notes: learning video + real interview questions from Dachang + microservices + MySQL + Java + Redis + algorithm + network + Linux + Spring family bucket + JVM + study notes diagram

Guess you like

Origin blog.csdn.net/weixin_47345084/article/details/110352995