Alibaba/Tencent/Huawei/Meituan/The latest face-to-face experience, spring recruits change jobs and increase salary!

Preface

Looking back at the troubled 2020, the new crown epidemic continues to ravage the world, and the epidemic diagnosis curve is ups and downs, which triggers a series of events: economic shrinkage, fiscal stimulus, vaccine research and development, economic recovery, and so on. All affect the nerves of the market. The "post-epidemic era" will redefine the year 2021, and grasp the opportunity when the old and the new are handed over. Cherish the present. Regarding the interview, Java interview questions are specially integrated, hoping to help small partners who are looking for a job or changing jobs.

Java basics

1. The difference between List and Set.

2. How does HashSet guarantee non-repetition?

3. Is HashMap thread safe? Why is it not thread safe (it is best to draw a picture to show that it is not safe in a multi-threaded environment)?

4. The expansion process of HashMap.

5. The difference between HashMap1.7 and 1.8, explain what optimizations have been made in 1.8 and how to optimize them?

6、final finally finalize。

7. Strong references, soft references, weak references, and phantom references.

8. Java reflection.

9. The realization principle of Arrays.sort and the realization principle of Collection.

10. Application of LinkedHashMap.

11. Implementation principle of cloneable interface.

12. The difference between wait and sleep.

13. How is the array allocated in memory?

Java concurrency

1. The realization principle of synchronized and lock optimization?

2. The realization principle of volatile?

3. Java semaphore?

4. What is the difference between synchronized in static method and 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 them?

7. What is the difference between synchronized and lock?

8. How is Hashtable locked?

9. What is the concurrency problem of HashMap?

10. Introduction to ConcurrenHashMap? Why use red-black trees in 1.8?

11. Brief description of AQS.

12. How to detect deadlock? How to prevent deadlock?

13. Java memory model?

14. How to ensure the correct result of i++ under multi-threading?

15. Types, differences and usage scenarios of thread pools?

JVM

1. The memory structure of JVM.

2. The working process of the JVM method stack, what is the difference between the method stack and the local method stack?

3. How do references in the JVM stack relate to objects in the heap.

4. You can learn about escape analysis techniques.

5. The common algorithms of GC, the garbage collection process of CMS and G1, which two of the various stages of CMS are Stop the world, will CMS generate fragments, and the advantages of G1.

6. The understanding and advantages and disadvantages of mark removal and mark sorting algorithms.

7. The proportion of eden survivor area, why is this proportion, the working process of eden survivor.

8. How does the JVM judge whether an object should be GC, and what types of roots can be considered?

9. The difference between strong and weak references and what kind of operations GC performs on them?

10. Whether Java can GC direct memory.

11. The process of Java class loading.

12. The process and advantages of the parent delegation model.

13. Commonly used JVM tuning parameters.

14. Analysis of dump files.

15. Does Java have a way to actively trigger GC (no).

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?

5. What is the loading process of Spring Bean?

6. If you want to implement Spring AOP, how do you implement it?

7. If you were to implement Spring IOC, what issues would you pay attention to?

8. How does Spring manage transactions and transaction management mechanisms?

9. What are the different transaction propagation behaviors of Spring and what are they used for?

10. What design patterns are used in Spring?

11. How does Spring MVC work?

12. The principle of Spring cycle injection?

13. Understanding of Spring AOP, each terminology, how do they work with each other?

Redis

1. The difference between RDB and AOF.

2. Why RDB forks child processes instead of threads.

3. Redis basic data types.

4. The underlying data structure of zset, when does the jump table increase its height.

5. Distributed redis, cache and database read and write are inconsistent, and the answer is delayed double deletion.

6. The interviewer asked to talk about redis casually, so he also talked about cache penetration, breakdown, avalanche and processing methods.

SpringBoot-Spring Cloud

1. What is Spring Boot?

2. What are the advantages of SpringBoot?

3. What is JavaConfig?

4. How to reload the changes on Spring Boot without restarting the server?

5. What is the monitor in Spring Boot?

6. How to disable Actuator endpoint security in Spring Boot?

7. How to run Spring Boot applications on custom ports?

8. What is YAML?

9. How to realize the security of Spring Boot application?

10. How to integrate Spring Boot and ActiveMQ?

11. How to use Spring Boot to realize paging and sorting?

12. What is Swagger? Have you implemented it with Spring Boot?

13. What is Spring Profiles?

MySQL high-frequency 20 questions analysis

1. 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 storage engines (InnoDB, MyISAM, MEMORY) in MySQL?

4. What are the application scenarios of MySQL's MyISAM and InnoDB storage engines, transaction and lock levels?

5. What is the order in which the different elements of the query statement (where, jion, limit, group by, having, etc.) are executed?

6. What is a temporary table and when will the temporary table be deleted?

7. What is the difference between MySQL B+Tree index and Hash index?

8. The SQL query statement determines which type of index to create? How to optimize the query?

9. The difference between clustered index and non-clustered index?

10. What locks are there (optimistic locks, pessimistic locks), and how to add exclusive locks when selecting?

11. What are the differences between non-relational databases and relational databases, and what are the advantages?

12. Database three paradigms, design data tables according to a certain scenario?

13. The 7 problems of database read-write separation, master-slave replication, master-slave replication analysis?

Multithreading

1. How many ways does Java implement multithreading?

2. Understanding of Callable and Future.

3. What are the parameters of the thread pool, and the process of creating a thread in the thread pool.

4. The role and principle of the volitile keyword.

5. The usage, advantages and disadvantages of the synchronized keyword.

6. What are the implementation classes of the Lock interface and what are the usage scenarios?

7. The use and implementation principle of reentrant locks, the process of copy-on-write, read-write locks, and segment locks (segment in ConcurrentHashMap).

8. Pessimistic lock, optimistic lock, advantages and disadvantages, what are the disadvantages of CAS, and how to solve them?

9. How to ensure sequential execution of the three threads of ABC.

10. What are the status of threads?

11. The difference between sleep and wait.

12. The difference between notify and notifyall.

13. Understanding of ThreadLocal and its realization principle.

14. What is Spring Cloud?

15. What are the advantages of using Spring Cloud?

16. What does service registration and discovery mean? How to implement Spring Cloud?

17. What is the significance of load balancing?

18. What is Hystrix? How does it achieve fault tolerance?

19. What is a Hystrix circuit breaker? Do we need it?

20. What is Netflix Feign? What are its advantages?

21. What is Spring Cloud Bus? Do we need it? Multithreading

1. How many ways does Java implement multithreading?

2. Understanding of Callable and Future.

3. What are the parameters of the thread pool, and the process of creating a thread in the thread pool.

4. The role and principle of the volitile keyword.

5. The usage, advantages and disadvantages of the synchronized keyword.

6. What are the implementation classes of the Lock interface and what are the usage scenarios?

7. The use and implementation principle of reentrant locks, the process of copy-on-write, read-write locks, and segment locks (segment in ConcurrentHashMap).

8. Pessimistic lock, optimistic lock, advantages and disadvantages, what are the disadvantages of CAS, and how to solve them?

9. How to ensure sequential execution of the three threads of ABC.

10. What are the status of threads?

11. The difference between sleep and wait.

12. The difference between notify and notifyall.

13. Understanding of ThreadLocal and its realization principle.

14. What is Spring Cloud?

15. What are the advantages of using Spring Cloud?

16. What does service registration and discovery mean? How to implement Spring Cloud?

17. What is the significance of load balancing?

18. What is Hystrix? How does it achieve fault tolerance?

19. What is a Hystrix circuit breaker? Do we need it?

20. What is Netflix Feign? What are its advantages?

21. What is Spring Cloud Bus? Do we need it?

All the interview questions in the article can be shared with everyone for free, and those who need it can see how to get them at the end of the article.

ZooKeeper

1. What is ZooKeeper?

2. What does ZooKeeper provide?

3. Zookeeper file system.

4. How does Zookeeper ensure that the status of the master and slave nodes are synchronized?

5. Four types of data nodes Znode.

6. Zookeeper Watcher mechanism-data change notification.

7. The client registers the Watcher implementation.

8. The server handles Watcher implementation.

9. The client calls back Watcher.

10. ACL permission control mechanism.

11. Chroot features.

12. Session management.

Netty

1. What is Netty?

2. What are the characteristics of Netty?

3. What are the advantages of Netty?

4. What are the application scenarios of Netty?

5. What are the aspects of Netty's high performance?

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

7. What is the composition of NIO?

8. Netty's threading model?

9. The reasons and solutions for TCP sticking/unpacking?

10. What is Netty's zero copy?

11. What are the important components in Netty?

12. How many ways does Netty send messages?

13. How many threads does Netty start by default? When will it start?

14. What kind of serialization protocols do you know?

15. How to choose serialization protocol?

16. What heartbeat type settings does Netty support?

17. What is the difference between Netty and Tomcat?

18. NIOEventLoopGroup source code?

Tomcat

1. What is Tomcat?

2. What is the default port of Tomcat and how to modify it?

3. What kinds of connector operating modes (optimization) does tomcat have?

4. How many deployment methods does Tomcat have?

5. How does tomcat container create servlet class instance? What principle was used?

6. Tomcat working mode.

7. Tomcat top-level architecture.

8. Summary of Tomcat top-level architecture.

9. The subtle relationship between Connector and Container.

10. Container architecture analysis.

to sum up

Considering the length, I emphatically selected some common and important interview questions to show.

All interview questions are not static. The above interview questions are just a reference for everyone. The most important thing is to increase your knowledge reserve and be prepared.

Information acquisition method: Click the portal to  obtain the above information~

The important thing is said three times, forward + forward + forward, be sure to remember to forward! ! !

Guess you like

Origin blog.csdn.net/weixin_45132238/article/details/113920663