java back-end interview questions
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 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 HashMap 1.7 and 1.8, explain what optimizations have been made in 1.8 and how to optimize them?
6. Four references to objects
7, three methods for Java to obtain reflection
8. Java reflection mechanism
9. Implementation principles and differences between Arrays.sort and Collections.sort
10. Application of LinkedHashMap
11. Implementation principle of Cloneable interface
12. Exception classification and handling mechanism
13. The difference between wait and sleep
14. How to allocate arrays in memory
2020 Dachang Java Interview Real Questions Collection Broadcast
Kafka interview topics and answers
1. What is the design of Kafka?
2. What are the three definitions of data transmission?
3. What are the two conditions for Kafka to judge whether a node is still alive?
4. Does the producer send data directly to the leader (master node) of the broker?
5. Can Kafa consumer consume messages from designated partitions?
6. Does Kafka message use Pull mode or Push mode?
7. What is the message format of Kafka stored on the hard disk?
8. Kafka efficient file storage design features:
9. There are three key differences between Kafka and traditional messaging systems
10. How to place partitions in different Brokers when Kafka creates Topic
11. In which directory will Kafka create a new partition
12. How to save partition data to hard disk
13. Kafka's ack mechanism
14. How Kafka consumers consume data
15. Consumer load balancing strategy
16, the data is in order
17. Data grouping strategy when Kafaka produces data
2020 Dachang Java Interview Real Questions Collection Broadcast
Redis interview topics
1. What is Redis? Briefly describe its advantages and disadvantages?
2. What are the advantages of Redis compared to memcached?
3. Which data types does Redis support?
4. What physical resources does Redis consume?
5. What kinds of data elimination strategies does Redis have?
6. Why doesn't Redis officially provide a Windows version?
7. What is the maximum storage capacity for a string type value?
8. Why does Redis need to put all data in memory?
9. What should the Redis cluster solution do? What are the options?
10. Under what circumstances will the Redis cluster solution cause the entire cluster to be unavailable?
11. There are 2000w data in MySQL and only 20w data in redis. How to ensure that the data in redis are all hot data?
12. What are the suitable scenarios for Redis?
13. What are the Java clients supported by Redis? Which one is the official recommendation?
14. What is the relationship between Redis and Redisson?
15. What are the advantages and disadvantages of Jedis and Redisson?
16. Tell me about the concept of Redis hash slot?
17. What is the master-slave replication model of Redis cluster?
18. Will there be write operation loss in Redis cluster? why?
19. How is replication between Redis clusters?
20. What is the maximum number of nodes in a Redis cluster?
21. How to choose database for Redis cluster?
22. What is the use of pipelines in Redis?
23. How to understand Redis transaction?
24. What are the commands related to Redis transactions?
25. How to set the expiration time and permanent validity of Redis key?
26. How does Redis optimize memory?
27. How does the Redis recycling process work?
28. Locking mechanism
29, lock mutual exclusion mechanism
30, watch dog automatic extension mechanism
31. Reentrant locking mechanism
32, release the lock mechanism
33. Disadvantages of the above Redis distributed lock
34. Have you ever used Redis distributed lock? How is it implemented?
35. Have you used Redis as an asynchronous queue? How do you use it? What are the disadvantages?
36. What is cache penetration? How to avoid it? What is a cache avalanche? How to avoid it?
2020 Dachang Java Interview Real Questions Collection Broadcast
37. What is the difference between redis and memcached? Why is sometimes single-threaded redis more efficient than multi-threaded memcached under high concurrency?
38. How is redis master-slave replication implemented? How to realize the cluster mode of redis? How are redis keys addressed?
39. How to design distributed locks using redis? Talk about the realization idea? Is it possible to use zk? How to achieve? What is the difference between these two?
40. Do you know the persistence of redis? How is the bottom layer achieved? What are the advantages and disadvantages?
41. What are the redis expiration strategies? Does the LRU algorithm know? Write a java code implementation?
42. Cache penetration, cache breakdown, and cache avalanche solutions?
43. When choosing a cache, when to choose redis and when to choose memcached?
44. What should I do if the cache is inconsistent with the database?
45. How to solve the inconsistency between master and slave databases?
46, Redis common performance problems and solutions
47. What are the data elimination strategies for Redis?
48. What data structures are there in Redis?
49. If there are 100 million keys in Redis, 10w of them start with a fixed, known prefix, how to find them all?
50. Have you ever made an asynchronous queue using Redis and how did you achieve it?
51. How does Redis implement delay queues?
2020 Dachang Java Interview Real Questions Collection Broadcast
Microservice interview topics and answers
1. How to separate the front and back ends
2. What frameworks for microservices
3. Talk about the implementation principle of RPC
4. Talk about the realization principle of Dubbo
5. How to understand RESTful
2020 Dachang Java Interview Real Questions Collection Broadcast
The most comprehensive JVM interview topic
1. Memory model and partitions, you need to specify 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 principle and characteristics of mark removal, mark sorting, and copying algorithms are used separately
Where, 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. What are the areas of JVM memory and what is the function of each area?
12. How to judge whether an object is alive? (or how to judge GC objects)
13. Briefly describe the java garbage collection mechanism?
14.What are the methods of garbage collection in java?
15.java memory model
16.java class loading process?
17. Briefly describe the java class loading mechanism?
18. The parent delegation model mechanism of the class loader?
19. What is a class loader and what are the class loader?
20. Briefly describe the java memory allocation and recovery strategy and Minor GC and Major GC
2020 Dachang Java Interview Real Questions Collection Broadcast
Due to limited space, friends who need answers can follow the official account below to get them by themselves