Inventory of the most common interview questions for the latest Java in 2021, prepare for Ali, Byte, and Meituan

Java

Some simple questions in this part of Java basics are not directly put up.

basis:

  1. Java reflection? What are the disadvantages of reflection? How do you understand reflection (why does the framework need reflection)?
  2. Talk about the understanding of Java annotations, what problems have been solved?
  3. Do you understand the inner class? Do anonymous inner classes understand?
  4. The difference between BIO and NIO, 4 core cpu, 100 http connections, how many threads are required for BIO and NIO respectively
  5. The load factor of the HashMap.

jvm:

  1. jvm memory structure
  2. jvm tuning parameters
  3. What is class loading?
  4. When is the class loaded?
  5. java class loading process?
  6. Know which class loaders. The relationship between class loaders?
  7. The relationship between class loaders?
  8. Parental delegation of class loader  (combined with tomcat to talk about parental delegation)
  9. Why do parents need to delegate
  10. Java memory model
  11. What data is stored in the stack and in the heap?
  12. In which memory area the large object is placed
  13. How to classify the heap area
  14. What are the algorithms for garbage collection
  15. The whole process of GC
  16. What recovery method is used in the old generation in GC?

Hardcore dry goods!  A summary of the most common interview questions for the latest Java in 2020, prepare for Ali, Byte, Tencent

Multithreading:

 

  1. What are the parameters of the Java thread pool? How many kinds of blocking queues are there? What are the rejection strategies?
  2. Deadlock

Hardcore dry goods!  A summary of the most common interview questions for the latest Java in 2020, prepare for Ali, Byte, Tencent

Design Patterns:

  1. What design pattern has the most impact on you when reading the Spring source code? how to use?
  2. Singleton mode, usage scenarios of singleton mode
  3. Observer mode, the usage scenarios of the observer mode

Hardcore dry goods!  A summary of the most common interview questions for the latest Java in 2020, prepare for Ali, Byte, Tencent

Spring

  1. The difference between spring boot and spring
  2. ioc and aop (ioc process, aop implementation principle), spring aop exception handling, when an exception occurs after a piece of code is try catch, is the aop exception notification executed, and why?
  3. Talk about the life cycle of spring bean
  4. What is the bottom layer of spring data jpa?
  5. The difference between hibernate and mybatis
  6. spring boot filter
  7. spring boot interceptor
  8. Which one does Spring dynamic proxy use by default?
  9. Write the implementation of spring jdk dynamic proxy.
  10. Draw the whole process of spring boot processing an http request

Hardcore dry goods!  A summary of the most common interview questions for the latest Java in 2020, prepare for Ali, Byte, Tencent

Authority authentication

  1. What is the difference between authentication and authorization?
  2. What is a cookie? What is the purpose of a cookie? How to use a cookie on the server?
  3. What is the difference between Cookie and Session? How to use Session for authentication?
  4. Can Session still be used without cookies?
  5. Why can't cookies prevent CSRF attacks, but tokens can?
  6. What is Token? What is JWT? How to perform authentication based on Token?
  7. What is OAuth 2.0?
  8. What is SSO (single sign-on)

Microservices/distributed

 

  1. Why a gateway?
  2. What are the current limiting algorithms?
  3. Why do we need a distributed id? What are the distributed id generation strategies?
  4. Do you know RPC? What are the common RPC frameworks?
  5. If you let you design your own RPC framework, how would you design it?
  6. Dubbo understand? Does Spring Cloud understand?

Hardcore dry goods!  A summary of the most common interview questions for the latest Java in 2020, prepare for Ali, Byte, Tencent

database

 

  1. What is the difference between a non-relational database and a relational database?
  2. Four characteristics of transactions
  3. MySQL transaction isolation level? What level is the default?
  4. The difference between optimistic lock and pessimistic lock
  5. The difference between the two database storage engines
  6. The principle of leftmost prefix matching and its reasons
  7. Ideas for optimizing large tables
  8. The difference between where and having
  9. Sub-library and sub-table
  10. explain command

Hardcore dry goods!  A summary of the most common interview questions for the latest Java in 2020, prepare for Ali, Byte, Tencent

index

  1. How to speed up database query
  2. The difference between clustered index and non-clustered index
  3. When should you not use indexes?
  4. The underlying data structure of the index?
  5. How is B+ tree indexing better than red-black tree?

Hardcore dry goods!  A summary of the most common interview questions for the latest Java in 2020, prepare for Ali, Byte, Tencent

Redis:

  1. How is redis used in the project? What problem was solved?
  2. Talk about the process of querying with caching and the process of modifying with caching.
  3. What data structure does redis have
  4. What to do if the redis memory is full
  5. What are the redis memory elimination algorithms besides lru
  6. Possible problems with distributed cache
  7. Cache penetration problem

The internet

  1. Some common status codes of computer networks
  2. The protocol used by ping
  3. TCP's three-way handshake and four waved content
  4. Why TCP connection is a three-way handshake and disconnection is a four-way handshake
  5. The difference between TCP and UDP and usage scenarios
  6. The steps of a complete HTTP request
  7. How does http save login information (I don't understand the meaning too much)
  8. The relationship between Cookie and Session

Hardcore dry goods!  A summary of the most common interview questions for the latest Java in 2020, prepare for Ali, Byte, Tencent

Algorithm and data structure

algorithm

  1. Do you understand the LRU algorithm? Can you achieve one?
  2. Write sorting algorithm (fast sorting, heap sorting)

data structure

  1. Does Bloom Filter understand?

Hardcore dry goods!  A summary of the most common interview questions for the latest Java in 2020, prepare for Ali, Byte, Tencent

Design questions

  1. If there are 1 billion numbers, there is only one duplicate, and the memory can only hold 500 million numbers, how to find this duplicate number?
  2. How to design a spike system (server, database, distributed)? Design of distributed system?
  3. There is a server dedicated to receiving a large number of requests, how to design it?
  4. If you let you design your own RPC framework, how would you design it?
  5. How can a stackoverflow error appear quickly?

other problems

  1. Self introduction.
  2. Talk about the highlights of your project.
  3. Draw an architecture diagram of your project.
  4. Does Restful understand? Simply talk about my understanding of it. What if I want to return a boolean type of data?

Summary of experience

  1. Interview more, don't be afraid of failure, sum up more experience.
  2. Prepare as early as possible, whether it is before the job search, before the interview or after the interview.
  3. Be familiar with your resume.
  4. Telephone and video interviews are common, so prepare before the interview.
  5. adhere to! Although the offer may be late, as long as you don't give up, you will definitely not be absent.

Answer get

The answers to these interview questions have been compiled into a Java interview document

Hardcore dry goods!  A summary of the most common interview questions for the latest Java in 2020, prepare for Ali, Byte, Tencent

Java Interview Document

Hardcore dry goods!  A summary of the most common interview questions for the latest Java in 2020, prepare for Ali, Byte, Tencent

method of obtaining:

 

Guess you like

Origin blog.csdn.net/bjmsb/article/details/113619141