interesting! The 100 core Java interview questions from major manufacturers have been released. How many will you get in the whole process?

Preface

Today Timo heard that many of the fresh graduates who have been trained have caught up with the salary of friends who have been playing for two or three years. It makes sense. This is not justified.

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.

Let me share with you a wave of Java core interview questions selected by major Internet companies in October. Through the interview questions, I will analyze the gap between the technology stack I have and the needs of major companies, judge the difficulty of the interview, and further clarify my own learning. Direction.

Insert picture description here

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

Insert picture description here

  • What are the constant pool, data structure, design a constant pool yourself
  • Why String is designed to be final and what are the benefits? How does the equals method 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? This 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. Does the size method guarantee consistency? Do you know the cache line? The cache line filling technology used in it is to solve the difference between the put method and the put method of hashmap.
  • 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. Out-of-heap memory can oom. Will it be garbage collected? Out-of-heap memory will generally be used where the recycling algorithm has advantages and disadvantages.
  • 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 can users set the recycling memory by themselves? What are the benefits of such a design?
  • Talk about the tuning experience in the project
  • Let me talk about the longest citation 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 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 CMS and G1 occur during which STW 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 execution, how to ensure that it is executed at the last execution point
  • The difference between sync lock lock upgrade and lock lock downgrade
  • What is the optimization point 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 reordering fail?
  • Thread pool principle parameter introduces how to use thread pool in ordinary times, 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 many 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
  • The principle of automatic assembly 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 fail
  • 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 slow, how do you troubleshoot from the overall architecture to the details
  • What problems does the master-slave sentry cluster 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 linux's io model indot
  • The principle of bio
  • What is the use of pipes in netty in the netty project? The transmission principle of each message
  • What is zero copy of netty 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 as much 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 re-consumed, messages are orderly message accumulation, how to solve message persistence, how to achieve 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 does kafka partition mean if I want to set the offset?
  • Synchronization mechanism between Kafka replicas
  • The difference between microservices and distributed dubbo has used some protocols supported by dubbo without dubbo's spi dubbo circuit breaker function
  • 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 hystrics principle service isolation is done
  • Principle of Feing
  • How does the unified exception handling of the gateway work? 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. For the full version of the content, please click here, here , and the code: CSDN.

Insert picture description here
Insert picture description here

Sharing of real interview questions
Insert picture description here

to sum up

Insert picture description here

I personally think that if you want to rely on the test questions on the back to get your favorite offer, it may be a bit difficult. 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 several years, even a fresh graduate's salary It's not comparable. After all, I made the wrong payment, and I didn't improve my skills 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 Dachang, and sort out a more clear learning direction for yourself. When you are ready to interview Dachang, you have a bottom in your heart and probably know The interviewer will ask how broad and deep, to 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 perform operations, otherwise you will not be able to learn just remembering, here I also provide some brain maps to share for everyone:

Insert picture description here

The important thing is to say it again: if you want to receive all the information shared in the article for free, please click here, here , the code: CSDN.

Guess you like

Origin blog.csdn.net/qq_41770757/article/details/109552741