The most comprehensive BAT interview study syllabus knowledge points in history: JVM+Redis+design pattern+concurrent programming+SpringMVC

Preface

Gold nine silver ten has arrived. As a developer, have you met your ideal company and your salary has reached the ideal height?

 

Interview: If you do not prepare for an adequate interview, it will be a waste of time and you will not be responsible for your own.

Today I will share with you the Java architecture interview topics and answers I have compiled. Most of them are interview questions frequently asked by large companies. You can check this to fill in the gaps. Of course, the list here is definitely not able to cover all the methods. But I also hope to help friends who are about to find a job!

Key points of the Java interview:

Data structure and algorithm, JVM memory structure, garbage collector, recycling algorithm, GC, concurrent programming related (multithreading, thread pool, etc.), NIO/BIO, performance optimization, design pattern, Spring framework: distributed related: Redis cache, Consistent Hash algorithm, distributed storage, load balancing, etc., microservices and Docker containers, etc. Due to the large amount of text here, I have summarized the frequently asked questions and frequently asked interview questions involved in the java interview to share with you for free, and I will receive it at the end of the article!

Some interview topics frequently asked

One, JVM and performance optimization

1. Describe the principle and mechanism of JVM loading Class files?
2. What is a class loader?
3. What are the class loaders?
4. What is the tomcat class loading mechanism?
5. The parent delegation model mechanism of the class loader?
6. Java memory allocation?
7. What is the structure of the Java heap?
8. Briefly describe the changes in the memory area of ​​each version?
9. Tell me about the role of each area?
10. Will there be memory leaks in Java, briefly?
11. Java class loading process?
12. What is GC? Why is GC?
13. Briefly describe the Java garbage collection mechanism?
14. How to judge whether an object is alive?
15. The advantages and principles of garbage collection, and consider 2 types of recycling mechanisms? What is the basic principle?
16. Deep copy and shallow copy?
17. What is distributed garbage collection (DGC)? How does it work?
18. When can objects be garbage collected in Java?
19. Briefly describe Minor GC and Major GC?
20. What are the methods of garbage collection in Java?
21. Tell me about the performance evaluation and test indicators you understand?
22. What are the commonly used performance optimization methods?
23. Talk about distributed caching and consistent hashing?
24. What is GC tuning?

 

Answer documentation

Two, Redis

1. What are the redis data structures?
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 are they implemented?
6. Redis cache invalidation strategy?
7. Redis cluster, high availability, principle?
8. Redis cache fragmentation?
9. Redis data elimination strategy?
10. Redis queue application scenario?
11. Distributed usage scenario (storage session)?

Three, SpringMVC

1. What is Spring MVC? Briefly introduce your understanding of springMVC?
2. What is the process of SpringMVC?
3. What are the advantages of Springmvc?
4. The main components of Spring MVC?
5. What are the differences between springMVC and struts2?
6. How does SpringMVC set redirection and forwarding?
7. How do SpringMvc and AJAX call each other?
8. How to solve the problem of garbled Chinese characters in POST request, and how to deal with GET?
9. What is the exception handling of Spring MVC?
10. Is the controller of SpringMvc singleton mode? If so, what are the problems and how to solve them?
11. What are the commonly used annotations in SpringMVC?
12. The comment of the controller in SpingMvc generally uses that. Is there any other comment that can be substituted?
13. If in the interception request, I want to intercept the method submitted by get, how to configure it?
14. How to get Request or Session in the method?
15. If you want to get the parameters passed in from the front desk in the interception method, how to get it?
16. If there are many parameters passed in at the front desk, and these parameters are all an object, how to quickly get this object?
17. What is the return value of the function in SpringMvc?
18. What object does SpringMvc use to transfer data from the background to the foreground?
19. How to put the data in ModelMap into Session?
20. How is the interceptor written in SpringMvc?
21. Annotation principle?

 

Answer document screenshot

Fourth, design patterns and reconstruction

1. Tell me about a few common design patterns (23 design patterns)?
2. What principles will be followed when designing a factory package?
3. List an open source project/library that uses the Visitor/ Decorator pattern?
4. How to implement a singleton?
5. Proxy mode (dynamic proxy)?
6. Singleton mode (lazy man mode, evil man mode, how to solve concurrent initialization, the use of volatile and lock)?
7. What are the design patterns in the JDK source code that impress you? Take an example?

Five, concurrent programming:

1. What is multi-threaded concurrency and parallelism?
2. What is thread safety?
3. What is the memory visibility issue of shared variables?
4. What is atomic operation in Java?
5. What is the CAS operation in Java and the realization principle of AtomicLong?
6. What is Java instruction reordering?
7. What is the memory semantics of the Synchronized keyword in Java?
8. What is the memory semantics of the Volatile keyword in Java?
9. What is false sharing, why does it occur, and how to avoid it?
10. What are reentrant locks, optimistic locks, pessimistic locks, fair locks, unfair locks, exclusive locks, and shared locks?
11. Tell me about the implementation principle of ThreadLocal?
12. ThreadLocal is used as a variable thread isolation method, how is it done internally?
13. Tell me about the implementation principle of InheritableThreadLocal?
14. How does InheritableThreadLocal make up for the fact that ThreadLocal does not support inheritance?
15. How is the internal implementation of CyclicBarrier different from CountDownLatch?
16. How does the Random class of random number generator use CAS algorithm to ensure the uniqueness of the new seed under multithreading?
17. How does ThreadLocalRandom use the principle of ThreadLocal to solve the limitations of Random?
18. How to use ThreadLocal to implement request scope scope bean in Spring framework?
19. The realization of the bottom layer of the lock in the concurrent package (understanding of AQS)?
20. Talk about the principle of exclusive lock ReentrantLock?
21. Talk about the principle of ReentrantReadWriteLock?
22. What is the understanding of StampedLock principle?
23. Talk about the understanding of the principle of the non-blocking unbounded queue ConcurrentLinkedQueue based on the linked list?
24. How does ConcurrentLinkedQueue use CAS non-blocking algorithm to ensure the thread safety of multi-threaded enqueue and dequeue operations?
25. Principle of LinkedBlockingQueue based on linked list.
26. How does the blocking queue LinkedBlockingQueue use two exclusive locks ReentrantLock and the corresponding condition variables to ensure the thread safety of multi-threaded first-in-queue and dequeue operations?
27. Analyze the use and principle of the countdown counter CountDownLatch in JUC?
28. What is the difference between CountDownLatch and the thread Join method?
29. Tell me about the use of CyclicBarrier in JUC?
30. How is the internal implementation of CyclicBarrier different from CountDownLatch?
31. What is the internal implementation of Semaphore?
32. How does the concurrent component CopyOnWriteArrayList implement a concurrent safe List through copy-on-write?

At last

In response to the above interview questions, I summarized most of the interview questions and answers involved in the Internet company java programmer interview. Documents and architecture video materials are shared for free (including Dubbo, Redis, Netty, zookeeper, Spring cloud) , Distributed, high concurrency and other architecture technical materials), hope to help you review before the interview and find a good job, and also save everyone's time to search for materials on the Internet to learn. Use every minute and every second of your time to learn to improve yourself, and don't use "no time" to hide your mental laziness! While you are young, work hard and give your future self an explanation! Share the structure information at the end of the article, follow the assistant at the end of the article to obtain it by yourself

kafka:

kafka

Spring principle:

spring source code

Netty:

Netty

Obtaining method: It is not easy to organize data, follow the assistant below to obtain it by yourself


 

Guess you like

Origin blog.csdn.net/mrchaochao/article/details/108586809