211 books +985 master cast to Ali, three times a week, have already taken the offer to share the experience

one side

1. The post of delivery is java development. After I introduced myself, the interviewer asked me about my basic situation, and asked me if I had any specific directions for applying for a job, such as partial algorithm, R&D, database or big data, and if I had some wishes.

2. Dig deep into the project. It involves the ideas and processes of the project; the difficulties encountered in the process and how to solve them; how to improve the performance; the underlying principles of the technology used, etc. (About half an hour)

3. The role of final, finally and finalize

4. The role and difference between synchronized and volatile

5. The design of some common classes in the Java util package, I talked about HashMap related content. (Underlying structure, determination of subscripts, expansion, thread insecurity, etc.)

6. Do you understand ConcurrentHashMap? (Segment lock before 1.8, CAS+synchronized after 1.8, and why it changed)

7. Does CAS understand? Pros and cons?

8. Have you written specific code for multithreaded programming? (Wrote a simple Web Server)

9. Let me talk about BIO, NIO and AIO. (Blocking/non-blocking, synchronous/asynchronous, and then talk about their respective principles)

10. The garbage collection algorithm commonly used by JVM. (Each algorithm and its advantages and disadvantages, whether it is used for young generation collection or old generation collection, why?)

11. Is the usual development environment Linux? Are you familiar with Linux commands? Give a log file and count the UV and PV. (Emmm can only do some basic daily operations, not this one...)

12. I just mentioned that you usually read some books. What are you reading recently? What books do you plan to read later? (Recently, I have seen an in-depth understanding of the art of Java virtual machine and concurrent programming. Plan to look at Algorithm 4)

13. Rhetorical link. During the period, I asked if I could get an offer and whether I could go for an internship before graduation. (Emmm will have a graduation thesis next semester, and the laboratory will not release it)

Two sides (after a week)

1. Introduction

2. Dig deep into the project.

3. The difference between synchronized and ReentrantLock and usage scenarios.

4. The detailed process of synchronized lock upgrade. (No lock -> Biased lock -> Lightweight lock -> Heavyweight lock)

5. Why synchronized was a heavyweight lock before. (The use of mutex lock at the bottom layer involves the conversion between user mode and kernel mode, and context switching consumes a lot of money)

6. Why does synchronized only have a lock upgrade process and no lock downgrade process? (Never thought about this question... why...)

7. The concept of deadlock. How to avoid deadlock.

8. What layers does the TCP/IP protocol contain? What are the protocols for each layer? The difference between TCP/UDP and applicable scenarios.

9. System design: online multiplayer web version chat room. You can see everyone's speech, and you can also see the history of the chat room. How to design? (Emmm hasn't understood this kind of questions, pull the hip...)

10. What do you think is your advantage? (The boasting part, of course, you have to boast hard hhhh.)

11. Rhetorical link. I also asked whether I can go to the internship (Is it because the department is short of people...) (After the previous side is over, if there is a next side, it will be notified within a week.)

12. Algorithm topic: For N arrays, calculate the Cartesian product and output. A[1,2,3],B[4,5,6],C[7,8,9], output {1,4,7},{1,4,8},{1,4,9 },{2,4,7}.... It should be a DFS problem without pruning.

Three sides

1. Evaluate your performance on the first two sides?

3. Ask the project, ask very carefully, how each step is realized, the process, if you don’t do it step by step by yourself, it will definitely reveal the stuff

4. What difficulties did you encounter when doing the project

5. What is redis used for? How is the efficiency?

6. How can distributed locks be implemented?

7. Ask some computer basics (finally)

8. The process of java code from writing to running

9. The heap memory is automatically recovered by gc, how to recover the stack memory?

10. What is a stack overflow? What scenarios might stack overflow occur?

11. Ask about the network, do you understand syn attacks? (I have read the blog before and I only know a little bit about it, but the interviewer is very good and said that if I don’t understand it, I won’t ask about it. I quickly said I don’t understand)

13. Let's change the question, the process of entering the URL to the page display? (Sleeping, I asked)

However, I didn't let me finish. I asked about DNS resolution in detail, and then asked about routing and forwarding in detail, saying that I am quite familiar with this aspect, so there is no need to talk about it.

14. Originally, I wanted to write an algorithm, but it is estimated that the time is almost there, so I didn’t let me write it, and I just asked the link directly.

Ask casually, and then ask when will there be results? The reply said within a week.

chances are for people who are prepared

After this time, I reflected on it for a long time, and found that I really had many shortcomings and loopholes, so I have been planning my own learning route recently. Whether you are reviewing for the interview or studying by yourself, I believe what I said is still It's kind of useful.

The above interview questions and answers

 

Guess you like

Origin blog.csdn.net/bjmsb/article/details/109334903