One year of R&D experience interviewing top-tier companies such as Alibaba, NetEase, Didi, etc. I was fortunate enough to get an offer from JD, because I made these preparations!

Preface

Recently I interviewed Alibaba Group (Cainiao.com, Ant Financial), NetEase, Didi, Dianwoda, Jingdong, and finally received Dianwoda, Jingdong offer, Ant Financial, and Cainiao.com is still there for a month. In the process... Finally, I was lucky enough to go to JD.com. But I want to thank Dianwoda's leadership and HR. It's really very, very good. Thank you very much for their continuous care and guidance.

Interview overall matters

  1. The resume must be prepared, the contact information must be correct, clear and eye-catching. The project experience is described in reverse chronological order. Pay attention to describing the responsibilities you undertake in the project. The resume template should be as simple as possible. After all, most programmers still prefer to be simple and clear.
  2. It is recommended to hire boss directly, I think it is very useful (not advertising).
  3. In general, the overall interview process is the telephone interview -> on-site interview -> HR interview -> waiting.
  4. Don’t think that HR says that it’s GG to let you go back and wait for the news. They have to discuss with your previous interviewer and report to the leader. If you are not in a hurry, you may have to compare with other candidates, so HR asks you to go back and wait for the news It doesn't mean you are finished.
  5. Prepare your self-introduction before the interview. It takes about 1 minute. You can write it on paper and read it on the phone. When you get to the scene, you will almost memorize your self-introduction.
  6. Prepare a solid foundation, this is the root of everything, it's useless without strength.
  7. During the interview, you can guide your interviewer to your knowledge (I've met you and he doesn't ask anything).
  8. Don’t worry if you encounter a design problem. The interviewer does not want you to design a perfect architecture with a high-concurrency and high-availability design pattern in a few minutes, but just want to see your ideas, see your adaptability, and then give you some tips. Can you adjust quickly.
  9. There will be offers, don’t worry, treat the interview as a communication process.

Knowledge to be prepared

The following are some of the most impressive questions in recent interviews, so they don’t belong to the company. Because they don’t make much sense, they are roughly classified and recorded. At present, I only think of so many, but you must know that these questions are just the tip of the iceberg. In this way, the most important thing is a solid foundation and a clear head.

Java basics

  • The source code of HashMap, the principle of implementation, and how optimized HashMap is made in JDK8.
  • How does the expansion of HaspMap expand, and why are they all 2 to the power of N?
  • The difference between HashMap, HashTable and ConcurrentHashMap.
  • Which performance is better under high concurrency, HashTable or ConcurrentHashMap, why, and how to achieve it.
  • What are the security risks of HashMap if it does not handle thread safety under high concurrency, and what are the specific manifestations.
  • The limited scope of the four modifiers in java.
  • Methods in the Object class.
  • The difference between interface and abstract class, note that JDK8 interface can be implemented.
  • Two ways of dynamic proxy, and the difference.
  • The way of Java serialization.
  • The difference between pass-by-value and pass-by-reference, what is Java like, and is there any pass-by-value reference.
  • An ArrayList is deleted during the loop, will there be a problem, why?
  • The @transactional annotation is invalid under what circumstances and why.

Data structure and algorithm

  • B+ tree
  • Quick sort, heap sort, insertion sort (in fact, eight sorting algorithms should be understood
  • Consistent Hash algorithm, the application of consistent Hash algorithm

JVM

  • The memory structure of the JVM.
  • The working process of JVM method stack, what is the difference between method stack and local method stack.
  • How do references in the JVM stack relate to objects in the heap.
  • You can learn about escape analysis techniques.
  • The common algorithms of GC, the garbage collection process of CMS and G1, which two of the various stages of CMS are Stop the world, CMS- will it produce fragments, the advantage of G1.
  • Understanding and advantages and disadvantages of mark removal and mark sorting algorithms.
  • The proportion of eden survivor area, why is this proportion, the working process of eden survivor.
  • How does the JVM determine whether an object should be GC? What types of roots can be considered.
  • The difference between strong and weak references and what the GC performs on them.
  • Whether Java can GC direct memory.
  • The process of Java class loading.
  • The process and advantages of the parent delegation model.
  • Commonly used JVM tuning parameters.
  • Analysis of dump files.
  • Is there a way to actively trigger GC in Java (no).

Multithreading

  • There are several ways to implement multithreading in Java.
  • Understanding of Callable and Future.
  • What are the parameters of the thread pool? The process of creating a thread in the thread pool.
  • The role and principle of the volitile keyword.
  • The usage of synchronized keyword, advantages and disadvantages.
  • What are the implementation classes of the Lock interface and what are the usage scenarios?
  • The use and implementation principle of reentrant locks, the process of copy-on-write, read-write locks, and segment locks (segment in ConcurrentHashMap).
  • Pessimistic lock, optimistic lock, advantages and disadvantages, what are the defects of CAS, and how to solve them.
  • How does the ABC three threads ensure sequential execution?
  • What are the thread status?
  • The difference between sleep and wait.
  • The difference between notify and notifyall.
  • Understanding of ThreadLocal, the realization principle.

Database related

  • Common database optimization methods
  • The advantages and disadvantages of the index, on what field to establish the index database connection pool.
  • Common configuration of durid.

computer network

  • The difference between TCP and UDP.
  • Shake hands three times, wave hands four times, why wave hands four times.
  • Long connection and short connection.
  • Whether the connection pool is suitable for long connections or short connections.

Design Patterns

  • Several commonly used design patterns in JDK?
  • What are the main benefits of using the factory model? Where is it used?
  • Give a decoration pattern (decoratordesignpattern) implemented in Java? Does it act on the object level or the class level?
  • Under what circumstances would you prefer to use abstract classes rather than interfaces?

Distributed correlation

  • Control of distributed transactions.
  • How to design distributed locks.
  • How to design a distributed session.
  • What are the components of dubbo and what are their functions.
  • What are the load balancing algorithms of zookeeper?
  • How dubbo can communicate using interfaces.

Cache related

  • The difference between redis and memcached.
  • What data structure does redis support?
  • Is redis single-threaded? Is all work single-threaded?
  • How does redis store a String.
  • Redis deployment method, master-slave, cluster.
  • The sentinel mode of redis, how to find and store a key value in the redis cluster.
  • Redis persistence strategy.

Frame related

  • How does the Controller of SpringMVC correspond one-to-one between parameters and data from the front end.
  • How does Mybatis find the specified Mapper and how to complete the query.
  • How Quartz completes timing tasks.
  • Implementation of custom annotations.
  • What design patterns does Spring use.
  • What are the advantages of Spring's IOC.
  • How does Spring maintain the beans it owns.
  • Some newer things are the new features of JDK8, the concept and advantages of streams, and why there are such advantages.
  • How to design the double 11 transaction total panel

Some tips

  • You can go to leetcode to change your mind.
  • The eight sorting algorithms must be typed by hand (fast sorting, heap sorting is especially important).
  • Learn about some emerging technologies.
  • After the interview, the interviewer will ask you if you have any questions. Don't be okay, and don't be foolish to ask some sensitive questions.
  • Understand the products and competitive products of the company you are interviewing.

to sum up

No matter which company it is, it attaches great importance to high-concurrency and high-availability technologies, basics, and JVM.
The interview is a two-way selection process. Don't go to the interview with a fearful attitude, which is not conducive to your own performance.
At the same time, you should not only look at salary, but also whether you really like this company and whether you can really get exercise.
In fact, I have written so much, just my own summary, not necessarily applicable to everyone, I believe that after some interviews, everyone will have these feelings.
If these texts can help you, then it is the best. If it doesn't help, it will be my own record. Finally, I hope everyone can find a company that suits them and have a happy code

The last welfare egg

There are still many interview questions, but this article is limited in length, and only share some of the real Internet interview questions; about the interview questions I designed, I have compiled a complete collection of PDF interview questions, and now share it with you who need Java for free engineer friend in need can directly click here reply signal: CS can receive! ! !

Part of the information display
Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_50520844/article/details/109146406