Summary of Java Interviews in 2021 Spring Recruitment: Java + Concurrency + Spring + Database + Netty

Preface

Gold three silver four, a good season for job-hopping, students who are ready to switch jobs are gearing up to prepare for a few games. Today I will share with you the most frequently used interview question bank currently used by mainstream companies. The content covers: Java, MyBatis, ZooKeeper, Dubbo , Redis, MySQL, Spring, Spring Boot, Spring Cloud, RabbitMQ, Kafka, Linux, etc. **, ** are also the latest answers after the Java version upgrade, reorganizing and summarizing the latest answers, which will save the interviewer a lot of unnecessary detour. At the same time, detailed interview analysis documents have been made for each topic to ensure that readers at each stage can understand it.

Job hopping happens all the time, but I suggest that you think about why you want to quit before you quit. Don’t follow suit. Seeing that all of your colleagues have left, and you start the interview blindly (I didn’t prepare enough during the period), is it because of technical reasons (affecting your own development, deviating from your planned trajectory), or paying for it? Less, not taken seriously.

Due to the content of the materials and the limited space on the platform, the editor only intercepts and displays some of the interview topics and materials below. All interview topics and materials are displayed and freely available. Friends in need can click here to get them!

Java basics

  1. The difference between List and Set
  2. How does HashSet guarantee non-repetition
  3. Is HashMap thread-safe, and why is it not thread-safe (it is better to draw a picture to show that it is not safe in a multi-threaded environment)?
  4. The difference between HashMap 1.7 and 1.8, explain what optimizations have been made in 1.8 and how to optimize them?
  5. final finally finalize
  6. Strong reference, soft reference, weak reference, phantom reference
  7. Java reflection
  8. Arrays.sort implementation principle and Collection implementation principle
  9. Application of LinkedHashMap
  10. Implementation principle of cloneable interface
  11. Exception classification and handling mechanism
  12. The difference between wait and sleep

image.png

Java concurrency

  1. The realization principle of synchronized and lock optimization?
  2. The realization principle of volatile?
  3. Java's semaphore?
  4. What is the difference between synchronized in a static method and an ordinary method?
  5. How to realize that all threads wait for an event to occur before executing?
  6. CAS? What are the shortcomings of CAS and how to solve it?
  7. What is the difference between synchronized and lock?
  8. How is Hashtable locked?
  9. Concurrency problem of HashMap?
  10. Introducing ConcurrenHashMap? Why use red-black trees in 1.8?
  11. AQS
  12. How to detect deadlock? How to prevent deadlock?
  13. Java memory model?
  14. How to ensure the correct result of i++ under multithreading?
  15. Types, differences and usage scenarios of thread pools?
  16. Analyze the realization principle of thread pool and thread scheduling process?
  17. How to tune the thread pool and how to confirm the maximum number?
  18. ThreadLocal principle, what to pay attention to when using
  19. The usage of CountDownLatch and CyclicBarrier, and the difference between them?
  20. LockSupport tool
  21. Condition interface and its realization principle
  22. Understanding of Fork/Join framework
  23. The principle of segmented lock, thinking about the reduction of lock strength
  24. Eight blocking queues and the characteristics of each blocking queue

Summary of Java Interviews in 2020 Spring Recruitment: Java + Concurrency + Spring + Database + Netty

image.png

Spring

  1. BeanFactory 和 FactoryBean
  2. What is the understanding of Spring IOC and its initialization process?
  3. BeanFactory 和 ApplicationContext?
  4. How is the life cycle of Spring Bean managed? What is the loading process of Spring Bean?
  5. If you want you to implement Spring AOP, how do you do it?
  6. If you were to implement Spring IOC, what issues would you pay attention to?
  7. How does Spring manage transactions, transaction management mechanism?
  8. What are the different transaction propagation behaviors of Spring, and what are they used for?
  9. What design patterns are used in Spring?
  10. How does Spring MVC work?
  11. The principle of Spring cycle injection?
  12. How does Spring ensure the safety of Controller concurrency?

Summary of Java Interviews in 2020 Spring Recruitment: Java + Concurrency + Spring + Database + Netty

Distributed correlation

  1. Dubbo's underlying implementation principle and mechanism
  2. Describe the detailed process of a service from being published to being consumed
  3. How to do service governance in distributed systems
  4. The concept of interface idempotence
  5. How message middleware solves the problem of message loss
  6. How to deal with the failure of Dubbo service request
  7. Will the reconnection mechanism cause errors?
  8. Understanding of distributed transactions
  9. How to achieve load balancing, and what algorithms can be implemented?
  10. What is the purpose of Zookeeper and the principle of election?
  11. The vertical split of the data is split horizontally.
  12. Zookeeper principle and applicable scenarios
  13. zookeeper watch mechanism
  14. How to deal with redis/zk node downtime
  15. How to achieve a unique serial number in a distributed cluster
  16. How to make a distributed lock
  17. Which MQs have been used, how to use them, what are the advantages and disadvantages compared with other mqs, is the connection of MQ thread safe?
  18. How to ensure that the data of the MQ system is not lost
  19. List the database sub-database sub-table strategies you can think of; after sub-database sub-table, how to solve the problem of full table query
  20. Zookeeper's election strategy

database

  1. The four characteristics of transaction (ACID) atomicity, consistency, isolation, and durability?
  2. Concurrency of transactions? Transaction isolation level, what problems will each level cause, which level is MySQL by default?
  3. What is the difference between the three common MySQL storage engines (InnoDB, MyISAM, MEMORY)?
  4. MySQL's MyISAM and InnoDB storage engines, transaction and lock levels, and their respective applicable scenarios?
  5. The different elements of the query statement (where, jion, limit, group by, having, etc.) are executed in order?
  6. What is a temporary table, and when is the temporary table deleted?
  7. What is the difference between MySQL B+Tree index and Hash index?
  8. sql query statement to determine which type of index to create? How to optimize the query?
  9. The difference between clustered index and non-clustered index?
  10. What are the locks (optimistic locks, pessimistic locks), and how to add exclusive locks when selecting?
  11. What is the difference between a non-relational database and a relational database, and what are the advantages?
  12. Three paradigms of database, design data table according to a certain scene?
  13. 7 problems of database read-write separation, master-slave replication, master-slave replication analysis?
  14. Use explain to optimize sql and index?
  15. How to solve MySQL slow query?
  16. What are inner joins, outer joins, cross joins, Cartesian products, etc.?
  17. What kind of locks does mysql have, the principle of deadlock determination and specific scenarios, and how to solve the deadlock?
  18. What are the usage scenarios of varchar and char?
  19. mysql high concurrency environment solution?
  20. Transaction recovery mechanism (REDO log and UNDO log) when the database crashes?

Summary of Java Interviews in 2020 Spring Recruitment: Java + Concurrency + Spring + Database + Netty

Redis

  1. What data has been used by Redis, and how the underlying Redis is implemented
  2. Redis cache penetration, cache avalanche
  3. How to use Redis to implement distributed locks
  4. How to solve the problem of concurrent competition in Redis
  5. Several methods of Redis persistence, what are the advantages and disadvantages, and how to achieve
  6. Redis's cache invalidation strategy
  7. Redis cluster, high availability, principle
  8. Redis cache sharding, Redis data elimination strategy

Summary of Java Interviews in 2020 Spring Recruitment: Java + Concurrency + Spring + Database + Netty

Netty

  1. BIO 、 NIO 和 AIO
  2. The major components of Netty, Netty's threading model
  3. Reasons and solutions for TCP sticking/unpacking
  4. What kind of serialization protocols do you know? Including usage scenarios and how to choose
  5. Netty's zero copy implementation
  6. What are the performance aspects of Netty's high performance

Summary of Java Interviews in 2020 Spring Recruitment: Java + Concurrency + Spring + Database + Netty

JVM

  1. Detailed JVM memory model
  2. Tell me about the circumstances under which memory overflow and memory leak will occur?
  3. Talk about the Java thread stack
  4. What are the criteria for judging the promotion process from the young generation to the old generation of the JVM?
  5. FullGC appears frequently in JVM, how can I troubleshoot the problem online?
  6. Why does the class loading use the parental delegation model, and are there any scenarios that break this model?
  7. Class instantiation order
  8. JVM garbage collection mechanism, when to trigger MinorGC and other operations
  9. What is the complete GC process (from ygc to fgc) in the JVM?
  10. Various collectors have their own advantages and disadvantages, focusing on CMS and G1
  11. Various recycling algorithms
  12. OOM error, stackoverflow error, permgen space error

Summary of Java Interviews in 2020 Spring Recruitment: Java + Concurrency + Spring + Database + Netty

At last

Due to the space limitation of the Toutiao platform, the editor showed some of the above interview topics and materials. If you need to obtain the following interview materials and the Java core knowledge points compiled by senior architects, the method of obtaining: like + follow and click here to get it for free The information mentioned in the article , thank you for your cooperation and trust!

In addition, fan benefits : [ Spring source code 100 episodes of learning videos + Multi-threaded and high-concurrency HD recording and broadcasting resources of teacher Ma Junjun and JVM tuning actual recording and broadcasting HD video]

Interview documents for each topic

Summary of Java Interviews in 2020 Spring Recruitment: Java + Concurrency + Spring + Database + Netty

And Java core knowledge points compiled by senior architects

The knowledge points that the interviewer must ask during the interview include many knowledge points, including basic knowledge, Java collections, JVM, multi-threaded concurrency, spring principles, microservices, Netty and RPC, Kafka, diary, design patterns, Java Algorithm, database, Zookeeper, distributed cache, data structure, etc.

Summary of Java Interviews in 2020 Spring Recruitment: Java + Concurrency + Spring + Database + Netty

The method of obtaining information mentioned in the article: like + follow and click here to get it for free~

Spring source code learning video

Summary of Java Interviews in 2020 Spring Recruitment: Java + Concurrency + Spring + Database + Netty

Instructed by Soldier Horse: Multithreading and High Concurrency Training Camp

image.png

Instructed by Soldier Horse: JVM Tuning Actual Combat Training Camp

[External link image transfer failed. The source site may have an anti-leech link mechanism. It is recommended to save the image and upload it directly (img-VKXTbfal-1614844227940)(https://upload-images.jianshu.io/upload_images/22570485-4535bd80f50613fc?imageMogr2 /auto-orient/strip%7CimageView2/2/w/1240)]

After you like + follow, click here to get all the information mentioned in the article for free~

Guess you like

Origin blog.csdn.net/weixin_47066028/article/details/114370344