What do you ask about the second aspect of Ali's Java development? "He" who captured Ali P6+ tells you the answer

Share the good news. Recently, a fan friend who often communicates with me on technology successfully joined Ali! Call him Abu for the time being.

Most technical people have an Ali dream, and Abu is no exception. In the days when he was preparing to quit, Abu also went to other big factories for interviews, and finally he chose Ali. Abu joined the R&D department of Ali Cainiao Logistics in October, mainly responsible for the R&D of logistics network systems, with a level of P6+.

For many people, Double 11 every year is a big challenge. But within Ali, Abu and the others are actually quite idle. They only need to stay on duty all night to keep an eye on the running status of the system. If there is a problem, they will be busy. It is normal if there is no problem. (Generally there will be no problems [manually funny])

Abu went to Ali for a total of 4 interviews, all of which were technical. With 7 years of work experience, coupled with adequate preparation in the early stage, it was barely so laborious.

  • The first aspect mainly asks about algorithms, like sort sorting method, HASHMAP thread safety, spring IOC and AOP and bean life cycle, etc.;
  • The second side asked a lot of JVM;
  • Then the third side seems to ask Kafka, there are also issues such as network security https and deadlock;
  • On the fourth side, he drew an architecture diagram and asked questions based on the architecture diagram. After answering, he just waited to determine the entry time.

Today, I will mainly share with you the content of Ali's second interview about JVM. In addition to the basics of Ali Cainiao P6, the source code is indispensable, and the content of interviews with major factories is actually similar. The following are the questions raised by the interviewer (Abramovich is sorted out after the interview, and it is generally not bad):

1. JVM class loading mechanism, what did each step do?

2. What parts are included in the JVM runtime data area, what are the algorithms for garbage collection, and their characteristics? How to determine the object to be cleared?

What parts are included in the JVM runtime data area?

What are the garbage collection algorithms and their characteristics?

How to determine the object to be cleared?

3. What are the garbage collectors in JVM? What is the difference?

4. Mysql index types and differences? What is the difference between a clustered index and a non-clustered index?

5. The isolation level of the transaction

6. What design patterns were used in the creation of SpringBean?

7. Talk about IOC and AOP

8. Overview of the life cycle of beans in spring

9. From the perspective of source code, describe the entire access or invocation process of SpringMvc.

10. Talk about the parameter list and rejection strategy of the thread pool

11. Please outline AQS

On the second side, Abu felt that the interviewer wanted to use JVM to push him, such as the runtime data area, garbage collection algorithm, etc., as well as the transaction and the entire Springmvc process, AQS, etc., and asked a lot.

Interviewer: "Briefly talk about IOC and AOP."

Abu's answer at the time was indeed relatively simple. He read the source code several times. IOC is inversion of control, mainly for Bean management, and then object dependency injection. Abu talked about its multiple injection methods, and then returned Talking about the life cycle of the bean, the interviewer didn't ask any further questions.

Regarding AOP, Abu focused on the dynamic proxy model and the source code implementation of AOP. The interviewer nodded but didn't ask.

Interviewer: "From the source code point of view, describe the entire access or invocation process of SpringMvc."

Everyone must have used SpringMVC, but the source code is what makes you different from others. The core of Springmvc is a servlet, DispatcherServlet. The user submits from the browser to DispatcherServlet, which is distributed by this class, and then this class finds the specific processing method, and then submits it to the Handler and executes this Handler. After execution, it returns to ModelAndView. Finally It is to analyze the view and send the result to the browser. The interviewer said that the idea was correct, so he didn't ask much.

Core flow chart of springmvc call

Generally, all the questions in interviews with large factories are based on specific scenarios to ask you questions. Not only must you use these technologies, but you must also know why you want to use this technology, and how to achieve high availability. For social recruitment, I feel that the technical questions are relatively more in-depth, so it is necessary to understand some source codes, such as the principles of concurrency , which are often asked. Not to mention the JVM, it is almost a must.

All our programs are running on the Java virtual machine, and only deep learning of the underlying principles of the Java virtual machine, whether it is J VM memory area, heap generation and garbage collection algorithm, JVM performance tuning. After fully understanding the operating mechanism of the JVM, we can become a better Javaer.

At the same time, many Java development friends will always have incomplete answers when facing JVM during interviews. The answers are not what they asked. Today, this author will share a carefully organized JVM and performance tuning core practical knowledge for free. Point notes and JVM interview questions analysis (basic, advanced, actual combat) for everyone!

Due to the length of the article, the editor compiled a set of PDF document formats to complete the analysis and analysis of JVM and performance optimization. The document acquisition method:

If you need to get it, you can get it for free after one-click, three-connection, and then look at the assistant's WeChat: ( vip1024x )

Catalog display

From the five comprehensive analysis of the JVM, performance optimization and referred wrote a frequently asked interview resolve

1. JVM memory area division

2. JVM execution subsystem

3. Garbage collector and memory allocation strategy

4. Write efficient and elegant Java programs

5. Performance optimization

Analysis of JVM Frequently Asked Interview Questions

Content display

JVM memory area division content

  1. Program counter (thread private)
  2. Java stack (thread private)
  3. Local method stack (thread private)
  4. Heap (thread sharing)
  5. Method area (thread sharing)
  6. Direct memory (thread sharing)

2. JVM execution subsystem content

  1. Class file structure
  2. Bytecode instruction
  3. Class loading mechanism
  4. Class loader
  5. Tomcat class loading mechanism
  6. Detailed method call

Three, garbage collector and memory allocation strategy content

  1. Is it passed by value or by reference in Java?
  2. Reference type
  3. Basic garbage collection algorithm
  4. Dispose of garbage by generation
  5. Types of garbage collection GC in JAVA

Fourth, write efficient and elegant Java programs

  1. Object-oriented
  2. method
  3. General programming

Five, performance optimization

  1. Commonly used performance evaluation/test indicators
  2. Commonly used performance optimization methods
  3. Application service performance optimization

Analysis of JVM Frequently Asked Interview Questions

Due to the length of the article, the editor compiled a set of PDF document formats to complete the analysis and analysis of JVM and performance optimization. The document acquisition method:

If you need to get it, you can get it for free after one-click, three-connection, and then look at the assistant's WeChat: ( vip1024x )

 

Guess you like

Origin blog.csdn.net/qq_46388795/article/details/109898884