Come on, successfully passed the interview of Ali P7Java post, and share some interview experience

Interview process

Let me talk about the interview process first. Generally large companies have 3-4 rounds of technical skills and 1 round of HR. As far as Ali is concerned, I have gone through 4 rounds of technical aspects. The first two rounds mainly asked about the basics and project realization. The third round was about cross-face. Two interviewers mainly asked about project realization and expansion. The fourth round is the head of the department, mainly asking about some abstract things about architecture, technical and business understanding, and personal development.

The HR interview is mainly to chat with you to see your personal stability, values, initiative, etc. Generally, HR will not hang up, but many people hang up after the HR interview. The reason is actually not that you are in HR. The performance of the face is not good (except in a few cases), but your previous performance is average, a bit higher than 60 points (so you did not directly hang you in the previous interview), but you did not reach 80 points. At this time, the company Based on the consideration of multiple dimensions such as hc, talent ratio, and comparison with other candidates, the final decision is whether to give you an offer.

In addition, I have to say that there will be more investigations on algorithms in Toutiao today. I have faced 4 rounds of technology, and each round will ask 1 or 2 algorithm questions, which are probably easy and medium difficulty on LeetCode. Therefore, students who want to go to Toutiao are best to go to Leetcode to scan the questions first.

Points to note

  • One or two pages of your resume is the best, and it’s almost enough to write about 2-3 project experiences. Be sure to write the most bright project
  • The starting time of the work experience should be clearly written. In addition, large companies have back-to-back adjustments. Don’t merge or omit some shorter work experience. The impact may not only be the interview, but you may not be able to enter the company afterwards.
  • The blog doesn’t have any good articles. If there is no good project on github, don’t write it in your resume.
  • For the interviewer’s question, think clearly before answering. If you think it may take a long time, you can tell the interviewer that I will think about it and sort out my ideas.
  • If you don’t have a problem, just say no, don’t pretend to understand
  • When encountering certain problems, be more confident. Sometimes the interviewer may deliberately use a skeptical tone to examine you
  • Pay attention to your speaking speed and utterance during the interview. After I became an interviewer, I found that many people spoke very fast or could not speak clearly, which caused the interviewer to feel that you didn’t answer the point (especially Is the phone)
  • Be confident during the interview but don’t argue with the interviewer
  • Don't directly ask the result of the interview after the interview
  • Maintaining self-confidence and not being arrogant in the interview, I once asked a candidate that he knew well about hashmaps, but when the hashmap was expanded, he did not need to recalculate the hash. For many people, the interviewer always has a way to ask you down.
  • After each interview, I summarized the bad answers and the blind spots of knowledge points, and solved them.
  • When asked why you want to quit, you should start from the perspective of your own development, rather than complain about the former company.

 

In addition, in the process of job hunting, I also encountered a few interviewers who were not qualified. For example, when I came up with a very disdainful tone, I didn't say a few words and started dissing your project, which gave people a very bad experience. Therefore, please also interviewers or students who will be interviewers in the future, to maintain basic politeness and respect during the interview process, as Ali often said: When you interview others, they are also interviewing you.

The most important point is not to start doubting yourself just because you have failed several interviews. Always remember that the result of the interview = strength + luck. Sometimes the interviewer doesn’t know what you are good at, so it’s impossible for him to spend a lot of time asking what he doesn’t understand; sometimes he asks you and you know how, but it may be due to the way the other person asks questions and tone of voice. The answer is not smooth.

Next, let's talk about technology-related investigations.

In general, technology-related investigations are mainly divided into two parts, one is the foundation, and the other is experience.

The foundation includes java foundation, database, middleware, etc., which comes from daily accumulation and preparation before the interview.

Experience includes projects that have been done in the past, problems solved, and some scenario questions (such as how to ensure that your project is available if the traffic is ten times larger).

This article mainly talks about the basics, the next article will talk about experience.

basis

The following is a compilation of the knowledge points that I think are often inspected in interviews. They are not complete, but most of them are common interview questions.

java basics

set

The collection is divided into two parts: the non-thread-safe collection under the java.util package and the thread-safe collection under the java.util.concurrent.

List

Implementation and difference between ArrayList and LinkedList

Map

HashMap: understand its data structure, how to resolve hash conflicts (linked lists and red-black trees), expansion time, and avoid rehash optimization during expansion

LinkedHashMap: Understand the basic principles, which two are in order, and how to use it to implement LRU

TreeMap: understand the data structure, understand why its key object must implement the Compare interface, and how to use it to achieve consistent hashing

Set

Set is basically realized by the corresponding map, just look at it briefly

common problem

  • How does hashmap resolve hash conflicts, and why does the linked list in the hashmap need to be converted into a red-black tree?
  • When will hashmap trigger expansion?
  • Why is there an infinite loop when concurrently operating hashmap before jdk1.8?
  • Does each entry need to calculate the hash again when the hashmap is expanded?
  • Why should the length of the hashmap array be guaranteed to be a power of 2?
  • How to implement LRU with LinkedHashMap?
  • How to achieve consistent hashing with TreeMap?

Thread-safe collection

Collections.synchronized

Understand its implementation principle

CopyOnWriteArrayList

Understand the copy-on-write mechanism, understand its applicable scenarios, and think about why there is no ConcurrentArrayList

ConcurrentHashMap

Understand the principle of implementation, optimization when expanding, and compare with HashTable.

BlockingQueue

了解LinkedBlockingQueue、ArrayBlockingQueue、DelayQueue、SynchronousQueue

common problem

  • How does ConcurrentHashMap improve performance while ensuring concurrency safety?
  • How does ConcurrentHashMap allow multiple threads to participate in expansion at the same time?
  • How are LinkedBlockingQueue and DelayQueue implemented?
  • How does CopyOnWriteArrayList ensure thread safety?

Concurrent

synchronized

Understand the concepts of biased locks, lightweight locks, heavyweight locks and upgrade mechanisms, as well as the difference from ReentrantLock

CASE

Understand the implementation principle of AtomicInteger, the applicable scenarios of CAS, and how to implement optimistic locking

AQS

Understand the internal implementation of AQS and the implementation of synchronization classes that rely on AQS such as ReentrantLock, Semaphore, CountDownLatch, CyclicBarrier, etc.

ThreadLocal

Understand the usage scenarios and internal implementation of ThreadLocal

ThreadPoolExecutor

Understand the working principle of the thread pool and the settings of several important parameters

common problem

  • The difference between synchronized and ReentrantLock?
  • The difference between optimistic lock and pessimistic lock?
  • How to implement an optimistic lock?
  • How does AQS wake up the next thread?
  • How does ReentrantLock implement fair and unfair locks?
  • The difference between CountDownLatch and CyclicBarrier? What scenarios are each applicable to?
  • What should I pay attention to when applying ThreadLocal? For example, memory leaks?
  • Talk about what happens when you submit a task to the thread pool?
  • How to set several parameters of the thread pool?
  • When will the non-core threads of the thread pool be released?
  • How to troubleshoot deadlocks?

Today I have compiled a set of 5000-page Java learning manuals, freshly released, and share with you! The content of this manual focuses on Java technology, including JavaWeb, SSM, Linux, Spring Boot, MyBatis, MySQL, Nginx, Git, GitHub, Servlet, IDEA, multithreading, collections, JVM, DeBug, Dubbo, Redis, algorithms, interview questions, etc. content.

Come on, successfully passed the interview of Ali P7Java post, and share some interview experience

 

Come on, successfully passed the interview of Ali P7Java post, and share some interview experience

 

collection method

If you need to get it, it’s troublesome one-click triple-link + comment, and then add VX (tkzl6666) to get it for free

Some of the more common problems, by the way, enumerate the following:

JAVA

  1. 5 commonly used java-api packages.
  2. 5 methods commonly used in the String class.
  3. Precautions for API interface development.
  4. TCP/IP, HTTP protocol.

Collection-related issues (emphasis)

  1. The implementation and differences of HashMap, TreeMap, Hashtable, LinkedHashMap, ConcurrentHashMap, ArrayList, LinkedList, etc.
  2. Those in the above set are thread-safe, and those are not.
  3. Use these collections in those scenarios.
  4. What are the characteristics of the three interfaces of List, Map, and Set when accessing elements.

Thread related issues (emphasis)

  1. Several ways to create threads.
  2. The method of thread synchronization.
  3. The difference between wait and sleep.
  4. The difference between Runnable interface and Callable interface.
  5. How to achieve thread safety.

Framework-related knowledge (not much in this piece)

  1. The difference between Mybatis# and $.
  2. The difference between Hibernate and Mybatis.
  3. The difference between Spring MVC and Struts2.
  4. Hibernate's caching mechanism.
  5. What is Hibernate lazy loading.
  6. Why use spring

SQL (mainly investigating the related knowledge of Group by and Order by)

  1. Query the student with the highest grade in each class.
  2. Find the second student in each class.
  3. Query the top three students in each class by class.
  4. Find all the information of the third-to-last employee for the time of the hired employee.
  5. After the salary is sorted, the employees whose salary is ranked 2-8.
  6. Ranked by salary, the ranking starts from 1, and the salary is the same (if two people are tied for the first place, there is no second place, and the ranking continues from the third).
  7. Use a sql statement to retrieve all the student names and the number of duplicate records with duplicate names.

JavaScript/JSP/Servet (These are generally basic questions)

  1. The built-in objects and functions of JSP.
  2. Commonly used tags of JSTL.
  3. Servlet life cycle.
  4. The difference between URL and URI.
  5. The difference between Ajax synchronous and asynchronous.
  6. The process of using ajax to send asynchronous requests.

other

  1. The difference between & and &&.
  2. The difference between == and equals.
  3. Issues related to automatic unboxing/boxing of int and Integer.
  4. The difference between IO and NIO.
  5. The difference between final, finally, and finalize.
  6. The difference between Overload and Override.
  7. The difference between String, StringBuffer and StringBuilder.
  8. How to realize shallow clone and deep clone.
  9. The realization and optimization of singleton mode.
  10. Implementation of sorting (bubbling, selection, fast, etc.).
  11. Remove duplicate elements (actually rewrite equals and hashcode).

If you need to get it, it’s troublesome one-click triple-link + comment, and then add VX (tkzl6666) to get it for free

Guess you like

Origin blog.csdn.net/JavaBUGa/article/details/115177317