Ali senior technical expert: in each stage, what technologies should a programmer with 3 years of experience master

What technical capabilities should Java programmers with 3 years of work experience have? This may be what Java programmers are more concerned about. I want to explain here that the contents listed below are not all things that everyone knows, but the more you master, the higher the evaluation and salary you can get in the end.

1. Basic grammar

This includes the role of static, final, transient and other keywords, the principle of foreach loop, and so on. In today's interview, I asked you what the static keyword does. If you answer static modified variables and modified methods, I will think you are qualified. If you answer static blocks, I will think you are good. If you answer static inner classes, I will think you are very good. , I will be very satisfied with the static guide package, because I can see that you are very keen on researching technology.

The most in-depth time, I remember the interviewer asked me directly about the underlying implementation principle of the Volatile keyword (by the way, interviewing and being interviewed are relative, the interviewer asking this question also makes the interviewer feel that the interviewer is also a People who like to study technology increase the good impression of the interviewer on the company. I finally chose the company that asked this question), don't think this is too nitpicky - the simpler the question, the better you can see a person's level, others The vast majority of your technical considerations are based on depth first and breadth second, remember.

2. Collection

Very important and a must ask. Basically it is List, Map, Set. It asks about the underlying implementation principles of various implementation classes, and the advantages and disadvantages of implementation classes.

Collections need to master the implementation principles of ArrayList, LinkedList, Hashtable, HashMap, ConcurrentHashMap, and HashSet. If you can answer fluently, of course, it is better to master the CopyOnWrite container and Queue. In addition, one more thing, ConcurrentHashMap is asked a lot in the interview, probably because this class can derive a lot of questions. Regarding ConcurrentHashMap, I provide three answers or research directions for netizens and friends:

(1) Lock segmentation technology of ConcurrentHashMap.

(2) Whether the reading of ConcurrentHashMap needs to be locked and why.

(3) Whether the iterator of ConcurrentHashMap is a strongly consistent iterator or a weakly consistent iterator.

3. Frame

It's a commonplace, must-have question in an interview. Generally speaking, you will be asked about the framework you use in your project, and then you will be given some scenarios to ask you how to use the framework. For example, I want to do something when Spring initializes the bean, and I want to do it when the bean is destroyed. How to do some things, the difference between $ and # in MyBatis, etc., these are more practical, and it is not a problem to accumulate well and learn more about the details of the use of the framework.

If you answered the above questions well, the interviewer will often ask in-depth how the framework is implemented. The most asked is the implementation principle of Spring AOP. Of course, this is very simple. It can be done in two sentences, even if you don't know how to prepare it. The most perverted thing I encountered was asking me to draw a UML diagram implemented by Spring's Bean factory. Of course, facing such an in-depth question, I absolutely can't answer it /(ㄒoㄒ)/~~

4. Database

Nine times out of ten, the database will also ask. The difference between some basic images and all, left join, several kinds of indexes and their differences will not be discussed. The more important thing is the optimization of database performance. Take a day or two to prepare the content of SQL basics and SQL optimization.

But don't worry about the database. A company often has many departments. If you are not familiar with the database and the basic technology is very good, 90% of them will want you. It is estimated that you will be placed in a department that does not require very high database usage. Get some exercise.

5. Some problems with the Web

Java is mainly oriented to the web side, so some questions about the web must be asked.

The two most frequently asked questions I have come across are:

Talk about several implementations of distributed Session.

The four commonly used answers can naturally make the interviewer very satisfied.

Another frequently asked question is: talk about the difference and connection between Session and Cookie and the realization principle of Session. In addition to these two issues, the content in web.xml is the key point, Filter, Servlet, Listener, let's not say that they are clear about their implementation principles, at least they can know the basics of their use. In addition, some details such as the difference between get/post, the difference between forward/redirect, and the implementation principle of HTTPS may also be examined.

6. Data structure and algorithm analysis

Data structures and algorithm analysis, for a programmer, are better than bad and definitely come in handy at work. Arrays and linked lists are the foundation. Stacks and queues are a little deeper but not difficult. Trees are very important. The more important trees are AVL trees and red-black trees. What is the difference between balanced tree, AVL tree and red-black tree. I remember an interview, an interviewer and I talked about the index of the database, he asked me: Do you know which data structure is used for the index?

I answered the Hash table used, and I answered incorrectly. He asked again, do you know why you need to use a tree? I answered that because there may be more conflicts in the Hash table, in the face of tens of millions or even hundreds of millions of data, it will greatly increase the time complexity of search. The tree is relatively stable, and it is basically guaranteed that the desired data can be found at most 20 or 30 times. Why do we think the index should be implemented using a tree?

As for the algorithm analysis, if you don't know or don't want to study it, forget it. I remember an interview where the other party asked me which sorting method the Collections.sort method uses. Well, I vomited three liters of blood. Of course, in order to show my erudition, I also have some research on algorithm analysis (⊙﹏⊙)b, I still bite the bullet and say that it may be bubble sort. Of course, the answer is definitely not. Interested netizens and friends can take a look at the source code of the Collections.sort method, which uses a sorting method called TimSort, which is an enhanced merge sort method.

7. Java Virtual Machine

To my surprise, the Java virtual machine should be a very important piece of content, and the probability of being asked about it in these companies is almost 0. You know, I spent a lot of time studying the Java virtual machine last year. I have read the book "In-depth Understanding of Java Virtual Machine: JVM Advanced Features and Best Practices" by Mr. Guang Zhou Zhiming.

Closer to home, although I didn't ask about the Java virtual machine, I think it is still necessary to study it. I will simply make an outline and talk about the more important content in the Java virtual machine:

(1) The memory layout of the Java virtual machine

(2) GC algorithm and several garbage collectors

(3) Class loading mechanism, that is, the parent delegation model

(4) Java memory model

(5) happens-before rule

(6) volatile keyword usage rules

Maybe the interview is useless, but on the way to the big cow, it is inevitable.

8. Design Patterns

I thought it was an important piece of content, but I was only asked once during an interview with Alibaba's B2B business department. At that time, I was asked about the decorator mode.

Of course, we can’t be so utilitarian. We learn for interviews. Design patterns are still very important and useful in our work. Among the 23 design patterns, we can focus on the ten or so commonly used ones. The questions and answers about design patterns in the interview are mainly three. directions:

(1) What design patterns are used in your project and how to use them.

(2) Know the advantages and disadvantages of common design patterns.

(3) Can draw UML diagrams of common design patterns.

In this regard, you can refer to the previous blog post "The Big Talk" Design Pattern.

9. Multithreading

This is also a must ask. Because of three years of work experience, I basically won't ask you how to implement multi-threading. I will ask in-depth questions such as the difference and connection between Thread and Runnable, what happens when a thread is started multiple times, and the status of the thread. Of course, this is only the most basic. Unexpectedly, several interviews were almost all asked a question at the same time, and the method of asking was different.

To sum it up it means:

If there are four threads Thread1, Thread2, ThreadD3, and Thread4 to count the sizes of the four disks C, D, E, and F respectively, and all the threads are counted and handed over to the Thread5 thread for summarization, how should it be implemented?

Do smart netizens have an answer to this question? Not difficult, there are ready-made classes available under java.util.concurrent.

In addition, the thread pool is also a frequently asked question. What are the commonly used thread pools? What are the differences and connections between these thread pools? What is the implementation principle of the thread pool? , let you answer what kind of thread pool is appropriate to use in this scenario.

Finally, although there are not many questions in this interview, multi-threaded synchronization and locking are also the key points. The difference between synchronized and ReentrantLock, the common method of synchronized lock and the static method of lock, the principle of deadlock and troubleshooting methods, etc.

10. JDK source code

If you want to get a high salary, you must read the JDK source code. The above content may also be related to specific scenarios. The JDK source code is to see if you usually like to study. During the interview, I was asked a lot of questions about the JDK source code, and the most tricky one asked me how the hashCode() method of String is implemented. Fortunately, I usually read the source code of String a lot and gave a general answer.

The JDK source code is actually nothing to sum up. It is purely based on the individual. Summarize the more important source code:

(1) Source code of List, Map, Set implementation classes

(2) Source code of ReentrantLock and AQS

(3) The implementation principle of AtomicInteger can mainly explain the CAS mechanism and how AtomicInteger is implemented using the CAS mechanism

(4) Implementation principle of thread pool

(5) Methods in the Object class and the role of each method

These are actually quite demanding. I basically researched the source code of important classes in the JDK for the whole year last year. It really took time and effort. Of course, looking back, it was worth it - not just for interviews.

Finally, if you are interested and have time, it is recommended to study and study SOA and RPC. Service-oriented systems are necessary for large-scale distributed architectures.

11. Suggestions

Each stage should have goals for each stage. No matter in life, study or work, we all need to set goals. Only by doing this can we have direction and motivation; mess. If you don't set goals, you will feel like you don't know what to do every day; you don't know what to do first and what to do later; you will feel lazy.

If you think the content of this article is helpful to you, you can follow me, and by the way, I will recommend an exchange and learning group: 650385180, which will share some videos recorded by senior architects: Spring, MyBatis, Netty source code analysis, high concurrency , the principles of high performance, distributed, microservice architecture, and JVM performance optimization have become a must-have knowledge system for architects. You can also receive free learning resources. The knowledge brain maps listed in the article are also shared and sorted out from the group.

 

 

Summarize:

The Lifelong Growth Dictionary entry "464: The Flower Pot Effect" mentions:

There is such a term in psychology, called the "flower pot effect", which refers to the fact that if people stay in a comfortable "flower pot" for a long time, they will not think ahead and be content with the status quo. When you are satisfied with the status quo, do the same things day after day, and stop spending time improving yourself, then your growth insights will always stay in the original area.

I have seen such a sentence: the sign of a person getting old is definitely not being mature and prudent, but refusing to try again, unwilling to allow himself to be in an unfamiliar situation. When you stop learning, rest on your laurels, and imprison yourself in the cage of just getting by, then you have taken a big step towards mediocrity.

Guess you like

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