Ali returned from an interview, and Java programmers want to talk about!

The first question: What are Ari interview to ask?

======================

This is to make the most troublesome LZ a problem, but also the group of apes faithful ask a question the most. To be honest, LZ can only vaguely remember concurrency, JVM, distributed, TCP / IP protocol for these keywords, specific question really is almost never remember. And even LZ remember, but also to tell you, and you will be back, but the LZ think, in the interview, you asked about the possibility of exactly the same problem remains small.

The first stage is the primary language itself and its advanced features, the second stage is to talk about their projects, and interspersed with questions.

So, LZ may wish these two stages, ready to talk about the club recruit interview, rather than go back to Ali the interview process again. To be honest, LZ also do not remember, so do not ask LZ Ali interview will be asked what the problem, you see that connection in the above article, will find, LZ which basically did not write specific questions, because Like, really remember ah. (Because of memory problems, leading LZ small side branches, liberal arts performance has been worrying, -_-)

How to Prepare for the interview recruit community

===============

LZ will be divided into four sections to talk about this issue, because the LZ itself is a Java background, so the main question about the language, are associated with Java, other language students can be selectively ignored. In addition, the question of the interview when the interviewer usually are linked together, and gradually in-depth, below this point we feel it may be more pronounced.

1, the main language itself as well as its advanced features.

Of course, the main language is normally used to make money you guys. Do not tell LZ you do not master the language, you'll multilingual N, N, or you are proficient in multiple languages, you have to say non, you can try to Hangzhou, LZ guarantee not to kill you, most crippled.

LZ's primary language is obviously Java, then for Java, its language itself as well as its advanced features, which are relatively easy to ask in the interview it?

Under normal circumstances, mainly in the following knowledge it is easy to be asked. (PS: The following listed are some of the advanced knowledge of Java is relatively little point, because here talking about social move, rather than recruit school)

1) Java class data structure associated with implementation principles, such as LinkedList, ArrayList, HashMap, TreeMap this category.

The following simple simulation data structure a chain gun.

For example, the interviewer ask you HashMap is not ordered?

You must answer that is not orderly. That the interviewer will continue to ask you, is there a sequential Map implementation class?

If you did not know at this time, then the question to this end. If you say there TreeMap and LinkedHashMap.

Then the next interviewer might ask you, how TreeMap and LinkedHashMap is to ensure that its order?

If you do not answer, so far. If you still answer it, then the interviewer will ask you again, do you think they ordered two of which achieved better?

If you still can answer, then the interviewer will continue to ask you, do you think there is no better way to achieve it, or more efficient?

If you can say it, then you said implementation sure you can still ask a lot of questions.

Above is an example of a step by step to ask questions of the interviewer. So, if you know much, do not perfunctory, because the next question you may be exposed, not directly say no, to end this problem out, and quickly switch to your familiar territory.

2) Java and contracting among the class, what role they have, and their implementation principle, these classes is java.concurrent package below.

As above, we also simulated a simple contract and the chain gun.

For example, the interviewer might ask you, if you want to achieve all of the threads waiting for an event to occur together, when an event occurs, all the threads together, then started down, what a good way?

This time you could say that the fence can be used (Java and contracting in CyclicBarrier), then the interviewer will continue to ask you, you know it's the principle of it to achieve?

If you continue to answer it, the interviewer may continue to ask you, do you know of other ways to achieve it?

If you can speak a variety of implementations, then continue to ask you, do you think the way in which way better?

If you say it a certain way better then the interviewer can still continue to ask you, if that makes you write, you think there is a better implementation than it do?

If you still can say at this time to better achieve your own way, then grabbing the interviewer will definitely continue to ask you this.

Why should guide the interview the interviewer, the reason for this. Because the interviewer's questions often are tracked, and if you caught his trajectory, he can guess what the following are likely to ask, then you can answer when the direction you want to talk about the past to say. This interview will appear more relaxed, more at ease.

3) IO NIO package and the package contents. This part of which will be the focus of NIO, most of the IO package will be more familiar with, so it may ignore it, what you directly ask the NIO.

IO and NIO package content package is relatively not a lot, first of all NIO model to be familiar with, in particular the selector must be very aware of its responsibilities and implement the principles. In fact, the core of NIO is the IO thread pool, be sure to remember this key point. Sometimes, the interviewer might also ask you design patterns IO package (decorator pattern), why this design?

Some interviewers will ask you is there a better design, this time if you do not know please say decisively limited their current levels, could not think of a better design, do not lip service, free YY.

4) the contents of the Java virtual machine. This section consists of three parts, GC, class loading mechanism, as well as memory.

A GC part simple chain gun.

The interviewer may ask you what time an object is GC?

Then you continue to ask why at this time the object will be GC?

Then continue to ask you what are classified GC policy?

If you say it, you continue to ask these strategies are what are the advantages and disadvantages? Apply to what the scene?

You continue to say out later, give you an actual scene that lets you select a GC policy?

If you are elected, and continue to ask you, why did he choose this strategy?

Here is a simple chain gun on class loading mechanism.

Of course, is to ask your Java class loader What are?

After answering these, you might ask each class loader which classes are loaded?

After the finish, you may ask these classes parent-child relationship between the loader what?

You might mention parents delegate model answer when you can continue to ask you what is the parent delegation model?

After you explain over, you may continue to ask why Java class loader to use the parent delegation model?

After you have answered, may continue to ask you how to customize your own class loader, how their own Java class loader and class loader that deal with the relationship?

One more chain gun on memory.

First, be sure is to ask your memory is divided into several sections, which are, respectively, which data is stored?

Then you continue to ask how an object is in the survival and metastasis in these parts from creation to destruction?

Then you might ask, what part of the memory will participate in GC recovery?

After the bin, you might also ask how Java memory model is designed?

After you answer, you will continue to ask why such a design?

After completion ask, also may let you combine design memory model to talk about the role of the volatile keyword?

When you are talking about, would certainly refer to visibility, the visibility of these three words then, you can continue to ask what you concurrency.

Basically the contents of the Java language itself and the language is a little high point of the section above, if you can understand more than four parts is very thorough, and that this part of Java basically nothing on the issue, because the contents of the above light enough for you to tell the interviewer officer talked for a long time. You talk to them talk for a long time, natural time to ask you other questions will be short points.

You write these questions from the LZ process should be able to feel it, very often, interviewers are asked to go all the way down the line, if you think you are not familiar with this line, then we would promptly turn, guide the interviewer to ask questions in other areas. Never been down further, until he jump out to date, it had a embarrassed the Gan.

2, talk about their projects, and interspersed with questions

This part of the interview process will ask, is the talk of the longest stage. Unless you are part of the language in front of a very solid, solid to the interviewer asks an hour or two, you still have not stuck his knowledge of the language itself in the end how deep. Otherwise, you will not escape their own projects this off, and talk time under normal circumstances would not be too short.

This part, the general pattern is that you tell yourself to your project done, then the interviewer will rather abruptly for you to interpret any portion thereof, such as let you explain then why he does it, or ask you now feel there is no more good way. And interspersed with these problems, most related to the technology used in your project. And you need to do is full, then go full summary of his past projects (especially in the last one or two projects), N even dig out a bright spot, ready to let the interviewer time to produce a front bright feeling. If you can achieve this effect, basically you success is not far away.

3, extra bonus items

The above two stages basically will ask, and some bonus items. These bonus items, the interviewer will ask you some content (such as TCP / IP protocols, algorithms), but more will ask you understand do not understand, you know, then continue to talk, I do not know if you ignore it too, and not because of this problem and direct you to hell.

LZ following list what these bonus items, if possible, these bonus items still have to fight for something is.

1, the computer system works.

2, network communication protocol (TCP / IP, HTTP, etc.).

3, data structures and algorithms.

4, source-known open source projects.

5, you have a great open source projects.

6, your personal blog.

7, pending the comments section to add.

Among these items, for the first 1-3, before if you are more understanding, but due to the time forgotten, then you can cram it in. As for the back of 4-6 items, you will need to accumulate daily, is not short-lived fad can do. If you normally do not accumulate, then the latter three bonus items can only be abandoned.

4, related to the content you post

In fact, this last one is a complement to the previous three, you should try to interview your main job-related content. For example, you interview a position calculated in real time, so you better be powerful algorithms, real-time calculation for the famous open source project to be familiar with, the best read source code, but also have some insight on distributed systems.

Therefore, this Part 4 no specific content, just to remind you, if you are very clear understanding of their job interview, it is best at the time of preparation before the interview, try to move closer towards the direction of demand jobs, a greater likelihood of success.

Author: Xiao Long left
http://www.zuoxiaolong.com/html/article_184.html#http://www.zuoxiaolong.com/html/article_184.html

I recommended to my blog to read more:

1. the Java the JVM, collections, multithreading, new series of tutorials

2. the Spring MVC, the Boot the Spring, the Spring series of tutorials Cloud

3. Maven, Git, the Eclipse, IDEA Intellij Tool Tutorial Series

4. the Java, the back-end architecture, Alibaba and other manufacturers face new questions

Life is beautiful, see tomorrow ~

Guess you like

Origin www.cnblogs.com/javastack/p/12617390.html