Featured 2021 Internet major Java core interview question bank (a must-see for spring recruitment)

Preface

Today’s blogger heard that many of the fresh graduates who have been trained have caught up with their friends who have been playing for two or three years. It makes sense. This is not justified. [I want to be quiet]

As a colleague, the industry is developing rapidly, the technology is updated quickly, and the elimination is also fast. Don't make any more excuses. If you want to eat this bowl of rice, it is better to think about how to improve your technology and improve your core competitiveness.

The following bloggers will share with you a wave of Java core interview questions selected by major Internet companies in February. Through the interview questions, they can analyze the gap between the technology stack they have and the needs of major companies, and judge the difficulty of the interview, so as to further clarify The direction of your own learning.

Tips: The complete content and answers of the selected core interview questions can be clicked on the portal ! !

Madden!  97 major Java core interview questions have been released. Oh, how many questions do you think you will?

 

Do you know all these interview questions? (Selected 97 core Java interview questions)

  • What are the constant pool, data structure, design a constant pool by yourself
  • Why is String designed to be final, what are its benefits, and how is the equals method implemented?
  • How to implement jdk serialization? Have you tested its performance? What is the role of serialVersionUID? Have you used some other serialization methods? Why do you need serialization technology?
  • The difference between hashmap1.7 and 1.8. How does hashmap solve the query time complexity data structure of hash conflicts?
  • Why is the load factor of hashmap 0.75? Have you ever thought about it and why the initial capacity is 16 and why is it not an infinite loop of 15 put
  • The difference between LinkedHashMap and hashmap data structure how to achieve LRU
  • What is the underlying sorting algorithm of TreeMap? Let's talk about fast sorting and heap sorting
  • The difference between ConcurrentHashMap1.7 and 1.8. The size method can ensure consistency. Do you know the cache line? The cache line filling technology used in it is to solve the difference between put method and hashmap put method
  • Talk about the @Contented principle of jdk
  • The difference between jvm and jmm talk about the jvm memory model
  • Does oom understand? Let’s talk about the memory area where oom may occur. Off-heap memory can oom. Will it be garbage collected? Where is the off-heap memory generally used?
  • The advantages and disadvantages of recycling algorithms
  • The difference between CMS and G1 talk about the data structure separately
  • The use scenarios of CMS and G1 respectively. What is the last step of G1? Why users can set their own reclaimed memory jdk What are the benefits of such a design?
  • Talk about the tuning experience in the project
  • Let me talk about the longest reference chain function of MAT, which is generally used to analyze what is faster
  • How do you analyze an OOM in general
  • Can the garbage collector be seen in the gc log?
  • What command to use to see the memory usage
  • How to see how many threads are running in the program
  • How to analyze the state of the thread What will happen if there are many threads in the BLOCKING and WAITING states? Talk about the difference between BLOCKING and WAITING
  • How to troubleshoot high CPU
  • Deep heap and shallow heap
  • What is the role of jinfo
  • What does STW mean when STW occurs during CMS and G1. Is it possible to avoid STW?
  • The difference between parallel and concurrency
  • Talk about the difference between sync lock and lock lock. They are all to ensure that in addition to these two methods, how can you elegantly ensure that the program runs normally?
  • The underlying principle of sync lock
  • Why lightweight locks are faster than heavyweight locks
  • The process runs halfway, the cpu switches to another thread, and then switches back to execute, how to ensure that it is executed at the last execution point
  • The difference between lock upgrade of sync lock and lock downgrade of lock lock
  • What are the optimization points of the lock downgrade of the lock lock, why can't the lock upgrade? What will happen if the lock upgrade occurs
  • Why use single instead of singleall for the data structure of aqs
  • What is the role of state variables and where are they used
  • Is cas necessarily better than using sync locks. Under what circumstances is it better to use sync locks?
  • How does cas solve the aba problem
  • What is the longadrr principle and what is the optimization
  • Why can't vaolitale guarantee atomicity and how does the reordering fail?
  • Thread pool principle parameter introduces how to use thread pool in ordinary times and how to gracefully monitor the shutdown of thread pool
  • What are the usual miscellaneous principles of concurrent tool classes?
  • The principle of disruptor is usually miscellaneous for the optimization point of the blocking queue
  • The difference between arraynlocingqueqe and linkedbloikingqueue
  • Solution to the problem of reordering under hanppen befor semantic multithreading
  • Forkjoin thought
  • Several implementations of design pattern strategies How to use the proxy uml diagram in your own project If there are a lot of if else, do you have to use strategies to transform the advantages and disadvantages of this transformation?
  • Implementation of static inner class in singleton
  • The difference between a builder and a factory
  • The difference between inheritance and inclusion
  • Design patterns used in spring
  • Talk about the source process of spring you have seen
  • The internal execution process of aop's notification method
  • How to solve multiple sub-transactions in a transaction
  • spi mechanism of springboot
  • Implementation principle of embedded tomcat of springboot
  • Automatic assembly principle of springboot
  • What are the index principles of mysql, why do you try to build a composite index, and why the leftmost index principle is violated and the index will become invalid?
  • The difference between indexed data structure B+ B tree is why B+ tree is faster
  • Does the scene of hash index use B+ tree?
  • If a query operation is very slow, how do you troubleshoot from the overall architecture to the details?
  • What problems do the master-slave sentinel clusters of redis solve?
  • How to realize the principle of master-slave synchronization
  • What can redis do
  • redis gossip protocol
  • Redis's hash algorithm consistency hash algorithm principle
  • Can the consistent hash algorithm solve the load balancing problem?
  • What is the io model indot of linux
  • The principle of bio
  • What is the use of pipes in netty in the netty project? The transmission principle of each message
  • What is the zero copy of netty's bytebuf double pointer
  • How to solve the tcp sliding window of sticky packets and half packets in netty What is the nagle algorithm netty
  • Realize a communication protocol by yourself, think of as perfect as possible
  • The difference between rpc and http implement an rpc by yourself
  • What is a doss attack and how to drill a loophole
  • How to choose the difference between several message middlewares and which ones are used in ordinary projects
  • How does Kafka ensure that messages are not lost, messages are not consumed repeatedly, messages are orderly message accumulation, how to solve message persistence, how to implement message elimination strategy
  • What is Kafka's lsu to ensure orderliness and how to balance performance
  • If it is 5 consumers, 3 partitions, 5 consumers can consume it?
  • What is the meaning of kafka partition in balance If I want to set the offset, how to set it
  • Synchronization mechanism between Kafka's replicas
  • The difference between microservices and distributed dubbo has used some protocols supported by dubbo without dubbo's fusing function for spi dubbo
  • The entire execution principle of dubbo from the provider to the consumer
  • The difference between springcloud and dubbo how springcloud is used in the project
  • How does hystrics principle service isolation work?
  • Principle of Feing
  • How is the unified exception handling of the gateway done? Generally, how do you do the authority? If the security front end is integrated through the gateway, will the front-end without Autchcation enter the gateway authorization filter?
  • Draw your architecture diagram and data flow, where is the scalability of your system
  • How to design a spike scene including the front and back ends
  • Now the backend log reports a transaction deadlock bug, how to troubleshoot
  • After nestat, I found that there are many wating processes. Consider what is the cause
  • A statistical data pushed by websockt, the program has been running for a period of time and suddenly the data is not updated, but the connection still exists, how to troubleshoot, there is no abnormal log
  • Find the four numbers in an array that add up to the other number in the array
  • The difference between tree traversal tree graph dfs bfs
  • The principle of es data structure inverted index es has the problem of low accuracy of Chinese retrieval
  • The difference between es participle and keywords
  • Distributed lock distributed transaction cap zab base pacox 2pc 3pc tcc
  • The difference between seata and lcn internal implementation principle
  • How to ensure that the thread in the program ends gracefully when kill adjusts a process

Answer: Due to the length of the article, the answer is shown here with screenshots. The full version of the content can be clicked on the portal ! !

Madden!  97 major Java core interview questions have been released. Oh, how many questions do you think you will?

 

Madden!  97 major Java core interview questions have been released. Oh, how many questions do you think you will?

 

Sharing of real interview questions from major companies in the past two years (Ali + Tencent + Baidu + Byte + Pinduoduo + Meituan, etc.)

Madden!  97 major Java core interview questions have been released. Oh, how many questions do you think you will?

 

Madden!  97 major Java core interview questions have been released. Oh, how many questions do you think you will?

 

to sum up

I personally think that if you want to rely on the test questions on the back to get your favorite offer, it is not too much to describe a toad who wants to eat swan meat. Presumably everyone can feel that the interview is getting harder and harder to find the job you like. The high-paying job is not envious, but you are not satisfied with your current salary. Even after working for a few years, even a fresh graduate's salary It's not comparable. After all, I made the wrong payment, and I didn't improve the technology after the wrong payment.

The purpose of these interview questions is to share with you. In fact, I hope you can analyze your own technology stack through the interview questions of the big factory, and sort out a more clear learning direction for yourself. When you are ready to interview the big factory, you have a bottom in your heart and probably know The interviewer will ask how broad and deep, and avoid asking three questions during the interview.

You can summarize and extend the knowledge of Java basics, JVM, concurrent programming, MySQL, Redis, Spring, Spring cloud, etc., and then operate, otherwise you will not be able to learn just by memorizing. Here I also provide some brain maps to share for everyone:

Madden!  97 major Java core interview questions have been released. Oh, how many questions do you think you will?

 

Madden!  97 major Java core interview questions have been released. Oh, how many questions do you think you will?

 

Madden!  97 major Java core interview questions have been released. Oh, how many questions do you think you will?

 

I hope that after reading this article, don’t hesitate to study, review your knowledge, and prepare to get your favorite offer in gold, silver and silver. Come on and hit workers!

To receive information, just click on the portal ! !

Guess you like

Origin blog.csdn.net/Java6888/article/details/115035252