preface
2020 is coming to an end, 2021 is around the corner, and so are job interviews.
Here we have compiled a set of popular interview questions and some popular Java interview questions to help you in the recruitment of social or school recruitment.
First of all, we need to understand the fact that a very key factor of recruitment is to find colleagues to work with in the future. At the same level, we need to find people who are better than ourselves. The interview is a two-way selection process, and it is also a process of heart-to-heart communication. For example, some of us feel that they are very awesome, but can not get the offer, while others can get the offer for a batch of dishes, we call it “metaphysical offer”. In this case, we should not feel any indescribable mood, just follow the fate!
The ant gold dress
Keywords [Java foundation] [algorithm] [cache] [database] [data structure]
1. What is the underlying implementation principle of HashMap?
2. Have you used Java multithreading before?
3. Talk about thread pools and how the underlying implementation of fixed size thread pools is implemented.
4. Why is Redis so efficient and what are the scenarios used?
5. Do you know about distributed services? Have zookeeper and Dubbo been used?
6. Do you know the concept of idempotence
7. What is the common database?
What are the transaction features of MySQL?
9. What if a production database is suspended?
How does the database implement ROLLBACK?
11. What are the advantages and disadvantages of Kafka?
12. How does TCP/IP ensure data reliability?
13. Query time complexity of HashMap
14. Differences between LinkedList and ArrayList
What is the difference between heap memory and stack memory
16. There is a one million line file, inside is the ID of the purchased goods, how to get the most bought 100 goods?
17. Do you understand the reliability of Consul?
18. Besides automatic configuration, what other differences does Spring Boot have compared to traditional Spring?
19.Object hashCode has been overwritten. Do you want to change equals?
20. What should I do if the online service CPU is too high? What steps can be taken to find the problem
21. What are the common methods of SQL optimization?
.
jingdong
Key words: [Java foundation] [Cache] [Big data component] [Message queue]
1. Introduce yourself
How can 2.5g and logistics be combined?
3. Questions you dug into your resume
4. What do you think of this position? Job selection
5. Have you used Spring?
6. Introduce the volatile keyword
7. Introduce the first big data project, what technologies were used, and draw an architecture diagram
8. How is the cluster deployed?
9. What are system logs collected by Flume?
10. What are the advantages and disadvantages of systems analysis? How to improve it?
11. How are five threads designed?
12. Understand conCurrentHashmap? To talk about
13. Have you used Redis? What are the data structures of Redis?
14. How many bytes is int? How many other numerical types are there?
15. Which groups and linked lists are commonly used? Talk about ArrayList and LinkedList
16. What about reflexes?
.
drops
Keywords [Java foundation] [multi-threading] [big data component principle] [NIO&RPC]
- ArrayList and LinkedList implementation and differences
2.HashMap: Learn about its data structure, how hash conflicts are resolved (linked lists and red-black trees), expansion timing, and avoiding rehash optimization during expansion.
3.TreeMap: Understand data structures, why their key objects must implement the Compare interface, and how to use it to implement consistent hashing.
4.LinkedHashMap: Understand the fundamentals, which two orders, and how to use it to implement LRU.
5. Sets are basically implemented by corresponding maps. (Generally take a look)
6. When will hashMap trigger expansion?
7. Do I need to compute hash again for each entry during hashMap expansion?
8. Why is there an infinite loop when running hashmap concurrently in jdk1.8?
9. How to implement LRU with LinkedHashMap?
10. How to implement consistent hash using TreeMap?
11. Learn about the copy-on-write mechanism, the scenarios it applies to, and why there is no ConcurrentArrayList.
12. How does ConcurrentHashMap improve performance while ensuring concurrency security?
13. How are LinkedBlockingQueue and DelayQueue implemented?
14. How does CopyOnWriteArrayList keep threads safe?
15. Learn about ThreadLocal usage scenarios and internal implementations
16. Understand the working principle of thread pool and the setting of several important parameters
17. The difference between optimistic and pessimistic locks?
18. How to implement an optimistic lock?
19. When will non-core threads from the thread pool be released?
20. What to watch out for when using ThreadLocal? Like a memory leak?
.
Hungry?
1. Introduce yourself
2. Tell me about the projects you’ve been involved in
3. How to solve the problem of the slow display of the page?
4. What problems do I encounter when I import data into the system?
5. Does Websocket understand the front-end mechanism
6. How to process log files with MapReduce?
7. What is the front end of the system made of?
8. The data structure of HashMap — introduces the differences between Java7 and Java8
9. Aside from data structures, how does Java8 differ from Java7 in HashMap
10. In the capacity expansion mechanism, why is the initial value of capacity 16? Can it be set to 15
11. Why is it faster to query by index — this should lead to binary tree algorithm
12. This section describes the data structure of ConcurrentHashMap
13. How many concurrent threads can ConcurrentHashMap support
14.ConcurrentHashMap belongs to a class under JOC
15. Have you ever used synchronized? Have you ever encountered concurrency problems before
16. What is the isolation level used by MySQL, and what problems can occur at this isolation level — concurrency issues that lead to the database
17. How does MySQL solve phantom reading problems when using this isolation level?
18.MySQL tuning mechanism, mainly what aspects of tuning — extraction index
19. Under MySQL’s InnoDB storage engine, clustered indexes (or clustered indexes) and non-clustered indexes are two concepts
20. What data structure is used to store indexes in MySQL
21. What problem does HashMap solve? — Introduces hash collision
22. Which layer of protocol does HTTP belong to?
23. Which layer of protocol is HTTP underlying based on?
24. The difference between HTTP and HTTPS?
25. Differences between GET and POST
26. What do you know about Web programming?
27. What is the difference between equals and ==?
28. What is the difference between static variables and static methods and instance variables and instance methods?
29. Why static methods and classes
30. Subclasses cannot override static methods
31. Design patterns to understand, such as singleton patterns, factory patterns, dynamic proxy patterns
32. What annotations should SpringBoot use when it should receive front-end Ajax requests
33. What is the use of the configuration annotation in SpringBoot?
.
Bytes to beat
Keywords [Java foundation] [algorithm] [Design mode] [lock correlation]
1. Introduce yourself
2. Introduce the project
3. Design a hashMap and implement a PUT method
4. Implement a list reversal, set a step size, every few times, the list is reversed
5. What are the indexes in Mysql?
6. Describe the isolation level of Mysql transactions
7. Talk about Mysql’s storage engine
8. Create a thread pool. What happens when the number of threads in the pool reaches the maximum?
9. Describe how to implement this process through JDBC without Mybatis.
How to use dynamic proxies if there is no interface and final is included?
11.Innodb index implementation
12. What is the difference between JDK and CGlib proxies?
13. Which design patterns do Spring AOP use?
14. Is there A dependency A on B or B on C?
15. The role of the Volatile keyword
16. How does Spring IOC solve the problem of loop dependencies?
17. Introduce Spring and Springboot
18. Tell us the difference between a B tree and a B+ tree
19. Talk about the implementation of HashMap and expansion mechanism. How to ensure operable expansion?
20.Redis expansion mechanism (progressive single-thread expansion)
21. The principle of Spring IoC, how to implement, how to solve the cycle dependency?
22.CAS concept and implementation principle of atomic class
23. What are the features of AQS?
24. Data skew is easy to occur in MapReduce. How do I solve this problem?
25. How does Hive data skew occur? How to deal with it?
26. Design a stack, including out of the stack, into the stack, whether empty, etc
27. Write a single example. What about multithreading?
28. Code problem: Complex linked list replication
29. Code problem: Array A, monotone address and then monotone decrement, output the number of different elements in the array.
30. When does garbage collection happen in the JVM? What kind of objects are recyclable?
.
The last
The ellipsis in the article is due to the consideration of space, it highlights some common important interview questions to show.
All interview questions are not immutable, the above interview questions just give you a reference role, the most important is to increase their knowledge reserve, be prepared.
The interview questions mentioned in this article have been organized into more than 40 sets of PDF documents, including: Java fundamentals, algorithms, databases, data structures, caching, Big data components, message queues, multi-threading, Principles of Big Data Components, NIO&RPC.