A must-have for gold three silver four interviews, "new" assault real question book, Ali Tencent bytes are stable

Preface

After the Spring Festival, the peak recruitment season is here. I don’t know if everyone is ready. If you don’t prepare carefully for the peak recruitment season, I think it’s irresponsible to myself; as for us Java programmers, most of them In general, the company interviews are based on the process of self-introduction + project introduction + project details/difficult questions + basic knowledge assessment + algorithm questions.

Some companies may also ask a few questions about actual scenarios. Ali must ask in this link. There is usually no correct answer to this kind of question. It depends on personal understanding and personal accumulation. The rest is nothing. It’s all about changing the soup instead of changing the medicine. Talking about the project depends on whether you have a thorough understanding of your own project. For example, I often ask you why you chose this technology and why you handled it like this. There are only so many basic knowledge points for the test, and the final algorithm is to brush the questions.

Today I will share with you the interview question bank most frequently used by Internet companies. After careful sorting, all questions have been updated with detailed answer analysis, and technical documents are specially made for reading and learning.

This sharing involves a total of knowledge points : Java basics, multithreading, JVM, Spring, SpringMVC, SpringCloud, Spring Boot, high concurrency, Redis, kafka, message middleware MQ, Dubbo, Tomcat, network protocol, data structure, MySQL, MyBatis , Design patterns, algorithms, etc.

Due to the content of the materials and the limited space of the platform, the editor shows some of the interview topics and materials above. If you need to obtain all the interview materials below, you can [see the picture below and add a small assistant] to get it.

1. Multi-threaded interview topics

  1. Now there are three threads T1, T2, and T3. How do you ensure that T2 is executed after T1 is executed, and T3 is executed after T2 is executed?
  2. What are the advantages of the Lock interface over synchronized blocks in Java? You need to implement an efficient cache that allows multiple users to read but only one user to write to maintain its integrity. How would you implement it?
  3. The difference between wait and sleep method in java?
  4. Implement blocking queue in Java.
  5. Write code in Java to solve the producer-consumer problem.
  6. Using Java to program a program that will cause a deadlock, how would you solve it?
  7. What are atomic operations and what are atomic operations in Java?
  8. What is the key to volatile in Java? How to use it? How is it different from the synchronized method in Java?
  9. What is a race condition? How do you discover and resolve competition?
  10. How will you use threaddump? How will you analyze Thread dump?
  11. Why do we execute the run() method when we call the start() method, and why can’t we call the run() method directly?
  12. How do you wake up a blocked thread in Java?
  13. What is the difference between CycliBarriar and CountdownLatch in Java?
  14. What is an immutable object, and how does it help to write concurrent applications?
  15. What are the common problems you encounter in a multithreaded environment? How did you solve it?

A must-have for gold three silver four interviews, "new" assault real question book, Ali Tencent bytes are stable

Screenshot of multithreaded interview topic answer analysis document

Second, JVM interview topics

  1. The memory model and partitions need to be detailed on what to put in each area.
  2. Partitions in the heap: Eden, survival (from + to), old age, their own characteristics.
  3. Object creation method, object memory allocation, object access location.
  4. Two judgment methods of GC:
  5. What is SafePoint
  6. The three collection methods of GC: the principles and characteristics of mark removal, mark sorting, and copying algorithms. Where are they used? If you are asked to optimize the collection method, what ideas do you have?
  7. What are the GC collectors? Features of CMS collector and G1 collector.
  8. When do Minor GC and Full GC happen respectively?
  9. Several commonly used memory debugging tools: jmap, jstack, jconsole, jhat
  10. Several processes of class loading:
  11. How to judge whether an object is alive? (or how to judge GC objects)
  12. Briefly describe the java garbage collection mechanism?
  13. java memory model
  14. Briefly describe the java class loading mechanism?
  15. The class loader parent delegation model mechanism?
  16. What are class loaders and what are the class loaders?
  17. Briefly describe java memory allocation and recovery strategies, Minor GC and Major GC

A must-have for gold three silver four interviews, "new" assault real question book, Ali Tencent bytes are stable

Screenshot of JVM interview topic answer analysis document

Three, Spring interview topics

  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 automatic wiring of Spring Bean?
  17. Please explain the difference in auto-assembly mode?
  18. How to turn on 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?

A must-have for gold three silver four interviews, "new" assault real question book, Ali Tencent bytes are stable

Screenshot of Spring interview topic answer analysis document

Four, Spring Cloud, Spring Boot, SpringMVC interview topics

1) Spring Cloud interview topics

  1. What is Spring Cloud?
  2. What are the advantages of using Spring Cloud?
  3. What does service registration and discovery mean? How to implement Spring Cloud?
  4. What is the significance of load balancing?
  5. What is Hystrix? How does it achieve fault tolerance?
  6. What is a Hystrix circuit breaker? Do we need it?
  7. What is Netflix Feign? What are its advantages?
  8. What is Spring Cloud Bus? Do we need it?

2) Spring Boot interview topics

  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?

A must-have for gold three silver four interviews, "new" assault real question book, Ali Tencent bytes are stable

Screenshot of Spring Boot interview topic answer analysis document

3) Spring MVC interview topics

  1. What is SpringMvc?
  2. Advantages of Spring MVC:
  3. How does SpringMVC work?
  4. SpringMVC process?
  5. Is the controller of SpringMvc a singleton mode? If so, what are the problems and how to solve them?
  6. If you have also used struts2, what are the differences between springMVC and struts2?
  7. Which annotations of the controller in SpingMvc generally use, and are there other annotations that can be substituted?
  8. What is the effect of @RequestMapping annotation on the class?
  9. How to map a request to a specific method?
  10. If in the interception request, I want to intercept the method submitted by get, how to configure it?
  11. How to get Request or Session in the method?
  12. I want to get the parameters passed in from the front desk in the interception method, how do I get it?
  13. If there are many parameters passed in at the front desk, and these parameters are all an object, how to quickly get this object?
  14. What is the return value of the function in SpringMvc?
  15. How to set redirection and forwarding in SpringMVC?
  16. What object does SpringMvc use to transfer data from the background to the foreground?
  17. There is a class in SpringMvc that merges views and data together. What is it called?
  18. How to put the data in ModelMap into Session?
  19. How do SpringMvc and AJAX call each other?
  20. When a method returns a special object to AJAX, such as Object, List, etc., what needs to be done?
  21. How is the interceptor written in SpringMvc
  22. Talk about the execution process of SpringMvc

A must-have for gold three silver four interviews, "new" assault real question book, Ali Tencent bytes are stable

 

Five, Redis interview topic 50 questions

  1. What is Redis?
  2. What are the advantages of Redis over memcached?
  3. Which data types does Redis support?
  4. What physical resources does Redis consume?
  5. What is the full name of Redis?
  6. What kinds of data elimination strategies does Redis have?
  7. Why doesn't Redis officially provide a Windows version?
  8. What is the maximum capacity that a string value can store?
  9. Why does Redis need to put all data in memory?
  10. What should the Redis cluster solution do? What are the options?
  11. Under what circumstances will the Redis cluster solution cause the entire cluster to be unavailable?
  12. There are 2000w data in MySQL and only 20w data in Redis. How to ensure that the data in Redis are all hot data?
  13. What are the suitable scenarios for Redis?
  14. What are the Java clients supported by Redis? Which one is the official recommendation?
  15. What is the relationship between Redis and Redisson?
  16. What are the advantages and disadvantages of Jedis and Redisson?
  17. How does Redis set the password and verify the password?
  18. Talk about the concept of Redis hash slot?
  19. What is the master-slave replication model of Redis cluster?
  20. Will there be write operations lost in the Redis cluster? why?
  21. How is replication between Redis clusters?
  22. What is the maximum number of nodes in a Redis cluster?
  23. How to choose a database for Redis cluster?
  24. How to test the connectivity of Redis?
  25. What is the use of pipelines in Redis?
  26. How to understand Redis transaction?
  27. What are the commands related to Redis transactions?
  28. How to set the expiration time and permanent validity of Redis key?
  29. How does Redis optimize memory?
  30. How does the Redis recycling process work?
  31. What algorithm does Redis use for recycling?
  32. How does Redis do a large amount of data insertion?
  33. Why do Redis partitions?
  34. Do you know what Redis partitioning schemes are there?
  35. What are the disadvantages of Redis partitioning?
  36. How to expand Redis persistent data and cache?
  37. Should distributed Redis be done in the early stage or in the later stage? why?
  38. What is Twemproxy?
  39. What are the clients that support consistent hashing?
  40. How is Redis different from other key-value stores?
  41. What is the memory usage of Redis?
  42. Are there any ways to reduce the memory usage of Redis?
  43. What command is used to view Redis usage and status information?
  44. What happens when Redis runs out of memory?
  45. Redis is single-threaded, how to improve the utilization of multi-core CPU?
  46. How many keys can a Redis instance store at most? How many elements can be stored in List, Set, Sorted Set?
  47. Redis common performance problems and solutions?
  48. What kinds of persistence methods does Redis provide?
  49. How to choose a suitable persistence method?
  50. Will the modified configuration take effect in real time without restarting Redis?

A must-have for gold three silver four interviews, "new" assault real question book, Ali Tencent bytes are stable

Redis interview topic answer analysis document screenshot

Six, RabbitMQ interview topics

  1. What is the broker in RabbitMQ? What does cluster mean?
  2. What is metadata? What are the types of metadata? What is included? What are the metadata related to cluster? How is metadata stored? How is the metadata distributed in the cluster?
  3. What is the difference between RAM node and disk node?
  4. Is there a limit on the number of messages stored in a queue on RabbitMQ?
  5. In the RabbitMQ concept, channel, exchange, and queue are logical concepts, or are they corresponding to process entities? What role do these things play?
  6. What is vhost? What role does it play?
  7. What is the difference between declaring queue, exchange, and binding in a cluster system composed of a single node system and multiple nodes?
  8. Can the client connect to any node in the cluster to work normally?
  9. If the owner node that owns a certain queue in the cluster fails and the queue is declared to have the durable attribute, can the queue be successfully re-declared from other nodes?
  10. What impact will the failure of the node in the cluster have on the consumer? If a mirrored queue is created in the cluster, what impact will the node failure have on the consumer at this time?
  11. Can RabbitMQ cluster be used in different geographically separated data centers?
  12. Why is it not recommended to use disk node in heavy RPC scenarios?
  13. What happens when I send a publish message to a non-existent exchange? What happens when you execute a consume action to a non-existent queue?
  14. What is the maximum length of routing_key and binding_key?
  15. What is the maximum message size allowed by RabbitMQ?
  16. Under what circumstances is it safe for the producer not to actively create a queue?
  17. What is the purpose of "dead letter" queue?
  18. Why do we say that the condition to ensure that the message is reliably persisted is that queue and exchange have durable attributes, while message has persistent attributes?
  19. Under what circumstances will the blackholed problem occur?
  20. How to prevent blackholed problems?
  21. What scenario is the Consumer Cancellation Notification mechanism used for?
  22. What is the usage of Basic.Reject?
  23. Why shouldn't you use a persistence mechanism for all messages?
  24. What problems are solved by the cluster, mirrored queue, and warrens mechanisms in RabbitMQ? What are the problems?

 

 

Seven, Nginx, Netty interview topics

1) Nginx interview topics

  1. Explain what is Nginx?
  2. Please list some features of Nginx.
  3. Please list the differences between Nginx and Apache
  4. Please explain how Nginx handles HTTP requests.
  5. In Nginx, how to use an undefined server name to prevent requests from being processed?
  6. What are the advantages of using a "reverse proxy server"?
  7. Please list the best use of Nginx server.
  8. Please explain what are the Master and Worker processes on the Nginx server?
  9. Please explain how you open Nginx through a port other than 80?
  10. Explain whether it is possible to replace Nginx errors with 502 errors and 503?
  11. In Nginx, explain how to keep the double slash in the URL?
  12. Please explain what is the role of ngx_http_upstream_module?
  13. Please explain what is the C10K problem?
  14. Please state what is the function of the stub_status and sub_filter commands?
  15. Explain whether Nginx supports compressing requests to upstream?
  16. Explain how to get the current time in Nginx?
  17. What is the purpose of explaining -s with Nginx server?
  18. Explain how to add modules on Nginx server?

A must-have for gold three silver four interviews, "new" assault real question book, Ali Tencent bytes are stable

 

2) Netty interview topics

  1. What is the difference between BIO, NIO and AIO?
  2. What is the composition of NIO?
  3. What are the characteristics of Netty?
  4. Netty's threading model?
  5. The reason and solution of TCP sticking/unpacking?
  6. What kind of 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?

8. Data structure interview topics

  1. Why does ConcurrentHashMap read without locking.
  2. How to synchronize HashMap.
  3. Tell me about the common collections.
  4. The difference between HashMap and HashTable.
  5. The specific process of the put method of HashMap.
  6. How is the expansion operation of HashMap realized?
  7. How does HashMap resolve hash conflicts?
  8. Why does HashMap not directly use the hash value processed by hashCode() as the subscript of the table?
  9. Why wrapper classes such as String and Integer in HashMap are suitable as Key.
  10. The difference between ConcurrentHashMap and HashMap.
  11. The fast failure mechanism "fail-fast" of the Java collection, and the safety failure "fail-safe".
  12. The difference between ArrayList and CopyOnWriteArrayList.
  13. The difference between ArrayList and LinkedList.
  14. How does HashSet ensure that data is not repeatable.
  15. What is BlockingQueue.
  16. Why HashMap uses red-black trees.
  17. Does the Add method exist in Iterator?

A must-have for gold three silver four interviews, "new" assault real question book, Ali Tencent bytes are stable

Data structure interview topic answer analysis document screenshot

Due to the content of the materials and the limited space of the platform, the editor shows some of the interview topics and materials above. If you need to obtain all the interview materials below , you can [see the picture below to add a small assistant] to obtain, including all the interview answers mentioned above , etc. Documentation.

A must-have for gold three silver four interviews, "new" assault real question book, Ali Tencent bytes are stable

Guess you like

Origin blog.csdn.net/m0_50180963/article/details/113940773