Dachang offer through train: 28 concurrent programming questions + JVM 21 questions + Redis 16 questions + Java collection 22 questions

Dachang interviews mainly and often ask technical points:

Concurrent programming, multi-threading, JVM, optimization, Spring, messaging framework, distributed, caching, etc. and the framework you have used and the foundation of the first round is very important. The possibility of admission after the meeting is relatively high!

Today, the editor has sorted out the technical questions frequently asked by these big factories, hoping to help friends who are still preparing for interviews late at night, and friends who are preparing for follow-up interviews.

The interview questions are as follows:

28 concurrent programming questions

  1. Have you used Synchronized and what is its principle?

  2. You just mentioned acquiring a lock on an object. What exactly is this "lock"? How to determine the lock of an object?

  3. What is reentrancy, and why is Synchronized a reentrant lock?

  4. What optimizations does JVM make to Java's native locks?

  5. Why is Synchronized an unfair lock?

  6. What is lock elimination and lock coarsening?

  7. Why is Synchronized a pessimistic lock? What is the principle of optimistic locking? What is CAS and what are its characteristics?

  8. Is optimistic locking necessarily good?

  9. Compared with Synchronized, what is the difference in the implementation principle of ReentrantLock?

  10. So please talk about the AQS framework?

  11. Please compare the similarities and differences between Synchronized and ReentrantLock in as much detail as possible.

  12. How does ReentrantLock achieve reentrancy?

  13. Apart from ReetrantLock, what other concurrency tools in JUC have you been exposed to?

  14. Please talk about ReadWriteLock and StampedLock.

  15. How to synchronize Java threads with each other? What synchronizers do you know about? Please introduce them separately.

  16. CyclicBarrier and CountDownLatch look very similar, please compare?

  17. Java thread pool related issues

  18. How is the thread pool implemented in Java?

  19. Several core construction parameters for creating a thread pool?

  20. How are threads in the thread pool created? Was it created at the beginning with the thread pool started?

  21. Since it is mentioned that different thread pools can be created by configuring different parameters, what thread pools are implemented by default in Java? Please compare their similarities and differences

  22. How to submit threads in the Java thread pool?

  23. What is Java's memory model, and how do threads in Java see each other's variables?

  24. Please talk about the characteristics of volatile and why it can guarantee the visibility of variables to all threads?

  25. Since volatile can guarantee the visibility of variables between threads, does it mean that operations based on volatile variables are concurrently safe?

  26. Please compare the similarities and differences between volatile and Synchronized.

  27. Please talk about how ThreadLocal solves concurrency safety?

  28. Many people say that ThreadLocal should be used with caution. Talk about your understanding, what should be paid attention to when using ThreadLocal?

The above are the 28 concurrent programming questions most frequently asked by big companies. I also collected some corresponding learning materials here.

 

JVM and tuning 21 questions

  1. Java class loading process?

  2. Describe the principle mechanism of JVM loading Class files?

  3. Java memory allocation.

  4. What is GC? Why is GC?

  5. Briefly describe the Java garbage collection mechanism

  6. How to judge whether an object is alive? (Or how to determine the GC object)

  7. The advantages and principles of garbage collection. And consider 2 recycling mechanisms

  8. What is the basic principle of the garbage collector? Can the garbage collector reclaim memory immediately? Is there any way to proactively notify the virtual machine for garbage collection?

  9. Will there be a memory leak in Java, please describe briefly

  10. Deep copy and shallow copy.

  11. What will System.gc() and Runtime.gc() do?

  12. When is the finalize() method called? What is the purpose of finalization?

  13. If the object's reference is set to null, will the garbage collector immediately release the memory occupied by the object?

  14. What is distributed garbage collection (DGC)? How does it work?

  15. What is the difference between a serial collector and a throughput collector?

  16. In Java, when can an object be garbage collected?

  17. Briefly describe the Java memory allocation and recovery strategy, Minor GC and Major GC.

  18. Will garbage collection occur in the permanent generation of the JVM?

  19. What are the methods of garbage collection in Java?

  20. What are class loaders and what are the class loaders?

  21. The class loader parent delegation model mechanism?

The above are the 21 questions about JVM and tuning frequently asked by big companies. I also collected some corresponding learning materials here. See the end of the article for information acquisition methods!

image

Redis 16 questions

  1. What is redis?

  2. Features of Reids

  3. Data types supported by Redis

  4. Redis is single-process and single-threaded

  5. Virtual Memory

  6. Redis lock

  7. Read-write separation model

  8. Data fragmentation model

  9. Redis recycling strategy

  10. What are the benefits of using Redis?

  11. What are the advantages of redis over memcached?

  12. Redis common performance problems and solutions

  13. There are 2000w data in MySQL, and only 20w data in redis. How to ensure that the data in redis is hot data

  14. What are the differences between Memcache and Redis?

  15. What are the common performance problems of Redis? How to solve?

  16. Redis is the most suitable scenario

The above are the Redis 16 questions frequently asked by major manufacturers, part of the corresponding learning materials. See the end of the article for information acquisition methods!

Java collection 22 questions

  1. The difference between ArrayList and Vector.

  2. Talk about the storage performance and characteristics of ArrayList, Vector, LinkedList.

  3. What is the difference between fail-fast and fail-safe?

  4. The data structure of hashmap.

  5. How does HashMap work?

  6. When will Hashmap expand?

  7. What are the characteristics of the three interfaces of List, Map, and Set when accessing elements?

  8. The elements in the Set cannot be repeated, so what method is used to distinguish whether they are repeated or not? Should I use == or equals()? What is the difference between them?

  9. Two objects have the same value (x.equals(y) == true), but they can have different hash codes. Is this sentence correct?

  10. What is the difference between heap and stack.

  11. What are the basic interfaces of the Java collection framework?

  12. What is the difference between HashSet and TreeSet?

  13. What is the underlying implementation of HashSet?

  14. How does LinkedHashMap work?

  15. Why does the collection class not implement the Cloneable and Serializable interfaces?

  16. What is an iterator?

  17. What is the difference between Iterator and ListIterator?

  18. What is the difference between Array and ArrayList? When should I use Array instead of ArrayList?

  19. What are the best practices for the Java collection framework?

  20. The elements in a set cannot be repeated, so what method is used to distinguish whether they are repeated or not? Should I use == or equals()? What is the difference between them?

  21. What are the Comparable and Comparator interfaces? List their differences

  22. The difference between Collection and Collections.

The above is a collection of 22 Java questions frequently asked by major Internet companies, with corresponding learning materials diagrams attached.

spring 25 questions

  1. What is the Spring framework? What are the main modules of the Spring framework?

  2. What are the benefits of using the Spring framework?

  3. What is Inversion of Control (IOC)? What is dependency injection?

  4. Please explain the IoC in the Spring framework?

  5. What is the difference between BeanFactory and ApplicationContext?

  6. How many ways to configure Spring?

  7. How to configure Spring based on XML configuration?

  8. How to configure Spring based on Java configuration?

  9. How to configure Spring with annotations?

  10. Please explain the life cycle of Spring Bean?

  11. What is the difference between the scope of Spring Bean?

  12. What are Spring inner beans?

  13. Are singleton beans in the Spring framework thread-safe?

  14. Please give an example of how to inject a Java Collection in Spring?

  15. How to inject a Java.util.Properties into Spring Bean?

  16. Please explain the autowiring of Spring Bean?

  17. Please explain the difference in auto-assembly mode?

  18. How to enable annotation-based automatic assembly?

  19. Please give an example to explain the @Required annotation?

  20. Please give an example to explain the @Autowired annotation?

  21. Please give an example of @Qualifier annotation?

  22. What is the difference between constructor injection and setting injection?

  23. What are the different types of events in the Spring framework?

  24. What is the difference between FileSystemResource and ClassPathResource?

  25. What design patterns are used in the Spring framework?

Sping’s review materials for interview knowledge points. Due to space limitations, only the catalog is shown here. Friends who need to obtain the learning materials mentioned in this article can follow me and add assistant VX: MXW5308 for free access

10 design patterns

  1. Please list several commonly used design patterns in JDK?

  2. What is a design pattern? Have you used any design patterns in your code?

  3. What is the singleton design pattern in Java? Please write a thread-safe singleton pattern in Java

  4. In Java, what is the observer design pattern (observer design pattern)?

  5. What are the main benefits of using the factory model? Where is it used?

  6. Give a decorator design pattern implemented in Java? Does it act on the object level or the class level?

  7. In Java, why is it not allowed to access non-static variables from static methods?

  8. Design an ATM machine, please tell me your design ideas?

  9. In Java, when do you use overloading and when do you use rewriting?

  10. Give examples to illustrate when you would prefer to use abstract classes instead of interfaces

The above are also 10 frequently asked design patterns for interviews of major companies, corresponding to the study review materials.

springboot 22 questions

  1. What is Spring Boot?

  2. What are the advantages of Spring Boot?

  3. What is JavaConfig?

  4. How to reload 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 implement paging and sorting?

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

  13. What is Spring Profiles?

  14. What is Spring Batch?

  15. What is a FreeMarker template?

  16. How to use Spring Boot to implement exception handling?

  17. Which starter maven dependencies did you use?

  18. What is a CSRF attack?

  19. What is WebSockets?

  20. What is AOP?

  21. What is Apache Kafka?

  22. How do we monitor all Spring Boot microservices?

The above are the 22 SpringBoot questions frequently asked by the first-line Internet companies in interviews, with corresponding learning and review materials.

Netty 10 questions

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

  2. What is the composition of NIO?

  3. The characteristics of Netty?

  4. Netty's threading model?

  5. The reason and solution of TCP sticking/unpacking?

  6. Which serialization protocols do you know?

  7. How to choose a serialization protocol?

  8. Netty's zero copy implementation?

  9. What are the high performance of Netty?

  10. NIOEventLoopGroup source code?

In view of the above frequently asked technical points in interviews with major companies, I have specially compiled a set of corresponding review materials for Java face pdf documents, which cover a wide range of content, which is especially suitable for some Java developers who are about to interview or are about to change jobs. To make up for leaks, readers and friends who need to obtain this set of documentation can subscribe to follow me

Information acquisition method: Add assistant VX: MXW5308 to obtain this set of Java surface classics pdf documents.

 

Guess you like

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