A two-year Java interview summary

foreword

It’s been nearly two years since I graduated in 2016. Recently, I interviewed Ali Group (Cainiao Network, Ant Financial), NetEase, Didi, Dianwoda, and finally received Dianwoda, Netease offer, and Ant Financial’s two-faced link Dropped, Cainiao Network is still in the process for a month...
Finally, I was fortunate to go to NetEase.
But I would like to thank Dianwoda's leadership and HR. They are really very good, and I am very grateful for their constant care and guidance.

Overall interview

  1. The resume should be prepared, the contact information must be correct, clear and eye-catching, the project experience should be explained in reverse chronological order, pay attention to describing the responsibilities that you undertake in the project, and the resume template should be as concise as possible. After all, most programmers still prefer simplicity and clarity.
  2. Recommend boss direct hiring, I think it is very useful (not advertising).
  3. The general overall interview process is telephone interview -> on-site interview -> HR interview -> waiting.
  4. Don’t think that HR says it’s GG to tell you to go back and wait for the news. They also have to discuss it with your previous interviewer and report to the leader. If they say it’s not urgent, they may have to compare with other candidates, so HR asks you to go back and wait for news. It doesn't mean you're screwed.
  5. Prepare a self-introduction before the interview. It takes about 1 minute. You can write it on paper, and you can read it on the phone. When you arrive at the scene, you will almost memorize your self-introduction.
  6. Prepare a solid foundation. This is the root of everything. Without strength, it is useless.
  7. During the interview, you can guide your interviewer to the knowledge you will know (I have met you and he will not ask what you know).
  8. Don't worry if you encounter design questions, the interviewer is not trying to let you design a perfect architecture with high concurrency and high availability design pattern in a few minutes, but just want to see your ideas, see your ability to adapt, 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 needed to prepare

The following are some of the most impressive questions in recent interviews, and they will not be divided into companies. Because they are meaningless, they will be roughly classified and recorded. At present, there are only so many questions I can think of, but you must know that these questions are only the tip of the iceberg. In this way, the most important thing is to have a solid foundation and a clear mind.

Java Basics

  1. The source code of HashMap, the implementation principle, and how to optimize HashMap in JDK8.
  2. How does HaspMap expand, and why is it the size of the N power of 2?
  3. The difference between HashMap, HashTable, ConcurrentHashMap.
  4. Under extremely high concurrency, HashTable and ConcurrentHashMap have better performance, why and how.
  5. What kind of security risks will HashMap have if it does not handle thread safety under high concurrency, and what are the specific manifestations.
  6. The limited range of the four modifiers in java.
  7. methods in the Object class.
  8. The difference between an interface and an abstract class, note that JDK8 interfaces can be implemented.
  9. Two ways of dynamic proxy, and the difference.
  10. The way Java serializes.
  11. The difference between pass-by-value and pass-by-reference, what is Java like, and is there a pass-by-value reference?
  12. An ArrayList is deleted during the loop, will there be a problem and why.
  13. Under what circumstances does the @transactional annotation fail and why.

Data Structures and Algorithms

  1. B+ tree
  2. Quick sort, heap sort, insertion sort (in fact, all eight sorting algorithms should be understood
  3. Consistent Hash Algorithm, Application of Consistent Hash Algorithm

JVM

  1. The memory structure of the JVM.
  2. The working process of the JVM method stack, what is the difference between the method stack and the native method stack.
  3. How references in the JVM stack are associated with objects in the heap.
  4. Learn about escape analysis techniques.
  5. 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, whether CMS will generate fragments, the advantages of G1.
  6. An understanding of mark-sweeping and mark-cleaning algorithms and their pros and cons.
  7. The proportion of the eden survivor area, why is this proportion, and the working process of eden survivor.
  8. How does the JVM judge whether an object should be GCed, and what types of root can be considered.
  9. The difference between strong and weak phantom references and what the GC does with them.
  10. Can Java GC direct memory.
  11. The process of Java class loading.
  12. The process and advantages of the parent delegation model.
  13. Commonly used JVM tuning parameters.
  14. Analysis of dump files.
  15. Is there any way for Java to actively trigger the GC (no).

Multithreading

  1. How many ways can Java implement multithreading?
  2. Understanding of Callable and Future.
  3. What are the parameters of the thread pool, the process of creating a thread in the thread pool.
  4. The role and principle of the volatile keyword.
  5. Synchronized keyword usage, advantages and disadvantages.
  6. What are the implementation classes of the Lock interface and what are the usage scenarios.
  7. The use and implementation principle of reentrant locks, the process of copy-on-write, read-write locks, segment locks (segment in ConcurrentHashMap).
  8. Pessimistic locking, optimistic locking, advantages and disadvantages, what are the defects of CAS, and how to solve them.
  9. How do the three threads of ABC guarantee sequential execution.
  10. What are the status of the thread.
  11. The difference between sleep and wait.
  12. The difference between notify and notifyall.
  13. ThreadLocal understanding, implementation principle.

Database related

  1. Common database optimization methods
  2. Advantages and disadvantages of indexing, what field to build index on
  3. Database connection pool.
  4. Common configuration of durid.

computer network

  1. The difference between TCP and UDP.
  2. Three handshakes, four waves, why wave four times.
  3. Long and short connections.
  4. Whether the connection pool is suitable for long or short connections.

Design Patterns

  1. Observer pattern
  2. proxy mode
  3. Singleton mode, there are five ways to write, you can refer to the article five implementations of singleton mode
  4. What design patterns can be used in Spring

Distributed correlation

  1. Control of distributed transactions.
  2. How to design distributed locks.
  3. How to design a distributed session.
  4. What are the components of dubbo and what are their functions?
  5. What are the load balancing algorithms of zookeeper?
  6. How dubbo can communicate using the interface.

cache related

  1. The difference between redis and memcached.
  2. What data structures does redis support.
  3. Is redis single-threaded, and all work is single-threaded.
  4. How does redis store a String.
  5. The deployment method of redis, master-slave, cluster.
  6. The sentinel mode of redis, how a key value is found and stored in the redis cluster.
  7. Redis persistence strategy.

Framework related

  1. How does SpringMVC's Controller correspond one-to-one parameters with the data from the front end.
  2. How does Mybatis find the specified Mapper and how to complete the query.
  3. How Quartz completes timed tasks.
  4. Implementation of custom annotations.
  5. What design patterns are used by Spring.
  6. What are the advantages of Spring's IOC.
  7. How Spring maintains the beans it owns.

something newer

  1. The new features of JDK8, the concept and advantages of streams, and why they have such advantages.
  2. Blockchain Understanding
  3. How to design the double 11 transaction total panel to achieve high concurrency and high availability.

some small suggestions

  1. You can go to leetcode to brush the questions and change your ideas.
  2. The eight sorting algorithms must be knocked out by hand (quick sort, heap sort is especially important).
  3. Learn about some emerging technologies.
  4. After the interview, the interviewer will ask you if you have any questions. Don't be okay, and don't be silly and ask some sensitive questions.
  5. Learn about the product and the competition of the company you're interviewing for.

few links

  1. Lots of Java Interview Questions
  2. More Java Interview Questions
  3. Or Java Interview Questions

Summarize

No matter which company it is, they attach great importance to high-concurrency and high-availability technologies, the foundation, and the 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 see whether you really like this company and whether you can really get exercise. In fact, I have written so much, it is just my own summary, not necessarily applicable to everyone, I believe that after some interviews, everyone will have these feelings.
If these words can help you, it will be the best, if not, it will be a record of my own.
In the end, I hope everyone can find a company that suits them, and happily write code~

I have a WeChat public account, and I often share some dry goods related to Java technology; if you like my sharing, you can use WeChat to search for "Java Head" or "javatuanzhang" to follow.

foreword

It’s been nearly two years since I graduated in 2016. Recently, I interviewed Ali Group (Cainiao Network, Ant Financial), NetEase, Didi, Dianwoda, and finally received Dianwoda, Netease offer, and Ant Financial’s two-faced link Dropped, Cainiao Network is still in the process for a month...
Finally, I was fortunate to go to NetEase.
But I would like to thank Dianwoda's leadership and HR. They are really very good, and I am very grateful for their constant care and guidance.

Overall interview

  1. The resume should be prepared, the contact information must be correct, clear and eye-catching, the project experience should be explained in reverse chronological order, pay attention to describing the responsibilities that you undertake in the project, and the resume template should be as concise as possible. After all, most programmers still prefer simplicity and clarity.
  2. Recommend boss direct hiring, I think it is very useful (not advertising).
  3. The general overall interview process is telephone interview -> on-site interview -> HR interview -> waiting.
  4. Don’t think that HR says it’s GG to tell you to go back and wait for the news. They also have to discuss it with your previous interviewer and report to the leader. If they say it’s not urgent, they may have to compare with other candidates, so HR asks you to go back and wait for news. It doesn't mean you're screwed.
  5. Prepare a self-introduction before the interview. It takes about 1 minute. You can write it on paper, and you can read it on the phone. When you arrive at the scene, you will almost memorize your self-introduction.
  6. Prepare a solid foundation. This is the root of everything. Without strength, it is useless.
  7. During the interview, you can guide your interviewer to the knowledge you will know (I have met you and he will not ask what you know).
  8. Don't worry if you encounter design questions, the interviewer is not trying to let you design a perfect architecture with high concurrency and high availability design pattern in a few minutes, but just want to see your ideas, see your ability to adapt, 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 needed to prepare

The following are some of the most impressive questions in recent interviews, and they will not be divided into companies. Because they are meaningless, they will be roughly classified and recorded. At present, there are only so many questions I can think of, but you must know that these questions are only the tip of the iceberg. In this way, the most important thing is to have a solid foundation and a clear mind.

Java Basics

  1. The source code of HashMap, the implementation principle, and how to optimize HashMap in JDK8.
  2. How does HaspMap expand, and why is it the size of the N power of 2?
  3. The difference between HashMap, HashTable, ConcurrentHashMap.
  4. Under extremely high concurrency, HashTable and ConcurrentHashMap have better performance, why and how.
  5. What kind of security risks will HashMap have if it does not handle thread safety under high concurrency, and what are the specific manifestations.
  6. The limited range of the four modifiers in java.
  7. methods in the Object class.
  8. The difference between an interface and an abstract class, note that JDK8 interfaces can be implemented.
  9. Two ways of dynamic proxy, and the difference.
  10. The way Java serializes.
  11. The difference between pass-by-value and pass-by-reference, what is Java like, and is there a pass-by-value reference?
  12. An ArrayList is deleted during the loop, will there be a problem and why.
  13. Under what circumstances does the @transactional annotation fail and why.

Data Structures and Algorithms

  1. B+ tree
  2. Quick sort, heap sort, insertion sort (in fact, all eight sorting algorithms should be understood
  3. Consistent Hash Algorithm, Application of Consistent Hash Algorithm

JVM

  1. The memory structure of the JVM.
  2. The working process of the JVM method stack, what is the difference between the method stack and the native method stack.
  3. How references in the JVM stack are associated with objects in the heap.
  4. Learn about escape analysis techniques.
  5. 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, whether CMS will generate fragments, the advantages of G1.
  6. An understanding of mark-sweeping and mark-cleaning algorithms and their pros and cons.
  7. The proportion of the eden survivor area, why is this proportion, and the working process of eden survivor.
  8. How does the JVM judge whether an object should be GCed, and what types of root can be considered.
  9. The difference between strong and weak phantom references and what the GC does with them.
  10. Can Java GC direct memory.
  11. The process of Java class loading.
  12. The process and advantages of the parent delegation model.
  13. Commonly used JVM tuning parameters.
  14. Analysis of dump files.
  15. Is there any way for Java to actively trigger the GC (no).

Multithreading

  1. How many ways can Java implement multithreading?
  2. Understanding of Callable and Future.
  3. What are the parameters of the thread pool, the process of creating a thread in the thread pool.
  4. The role and principle of the volatile keyword.
  5. Synchronized keyword usage, advantages and disadvantages.
  6. What are the implementation classes of the Lock interface and what are the usage scenarios.
  7. The use and implementation principle of reentrant locks, the process of copy-on-write, read-write locks, segment locks (segment in ConcurrentHashMap).
  8. Pessimistic locking, optimistic locking, advantages and disadvantages, what are the defects of CAS, and how to solve them.
  9. How do the three threads of ABC guarantee sequential execution.
  10. What are the status of the thread.
  11. The difference between sleep and wait.
  12. The difference between notify and notifyall.
  13. ThreadLocal understanding, implementation principle.

Database related

  1. Common database optimization methods
  2. Advantages and disadvantages of indexing, what field to build index on
  3. Database connection pool.
  4. Common configuration of durid.

computer network

  1. The difference between TCP and UDP.
  2. Three handshakes, four waves, why wave four times.
  3. Long and short connections.
  4. Whether the connection pool is suitable for long or short connections.

Design Patterns

  1. Observer pattern
  2. proxy mode
  3. Singleton mode, there are five ways to write, you can refer to the article five implementations of singleton mode
  4. What design patterns can be used in Spring

Distributed correlation

  1. Control of distributed transactions.
  2. How to design distributed locks.
  3. How to design a distributed session.
  4. What are the components of dubbo and what are their functions?
  5. What are the load balancing algorithms of zookeeper?
  6. How dubbo can communicate using the interface.

cache related

  1. The difference between redis and memcached.
  2. What data structures does redis support.
  3. Is redis single-threaded, and all work is single-threaded.
  4. How does redis store a String.
  5. The deployment method of redis, master-slave, cluster.
  6. The sentinel mode of redis, how a key value is found and stored in the redis cluster.
  7. Redis persistence strategy.

Framework related

  1. How does SpringMVC's Controller correspond one-to-one parameters with the data from the front end.
  2. How does Mybatis find the specified Mapper and how to complete the query.
  3. How Quartz completes timed tasks.
  4. Implementation of custom annotations.
  5. What design patterns are used by Spring.
  6. What are the advantages of Spring's IOC.
  7. How Spring maintains the beans it owns.

something newer

  1. The new features of JDK8, the concept and advantages of streams, and why they have such advantages.
  2. Blockchain Understanding
  3. How to design the double 11 transaction total panel to achieve high concurrency and high availability.

some small suggestions

  1. You can go to leetcode to brush the questions and change your ideas.
  2. The eight sorting algorithms must be knocked out by hand (quick sort, heap sort is especially important).
  3. Learn about some emerging technologies.
  4. After the interview, the interviewer will ask you if you have any questions. Don't be okay, and don't be silly and ask some sensitive questions.
  5. Learn about the product and the competition of the company you're interviewing for.

few links

  1. Lots of Java Interview Questions
  2. More Java Interview Questions
  3. Or Java Interview Questions

Summarize

No matter which company it is, they attach great importance to high-concurrency and high-availability technologies, the foundation, and the 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 see whether you really like this company and whether you can really get exercise. In fact, I have written so much, it is just my own summary, not necessarily applicable to everyone, I believe that after some interviews, everyone will have these feelings.
If these words can help you, it will be the best, if not, it will be a record of my own.
In the end, I hope everyone can find a company that suits them, and happily write code~

I have a WeChat public account, and I often share some dry goods related to Java technology; if you like my sharing, you can use WeChat to search for "Java Head" or "javatuanzhang" to follow.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324930141&siteId=291194637