Knowledge Point Learning method----serial Gun

Source: Internet
Author: User
Tags visibility

Turn from: Click to open the link http://www.cnblogs.com/zuoxiaolong/p/life51.html#3936308 This serial gun question, it is a good way to learn a certain knowledge .

LZ will be divided into four parts to talk about this problem, because the LZ itself is Java origin, so about the main language problems, are related to Java, other language students can selectively ignore. In addition, the interview when the general interviewer's questions are interlocking, gradually in-depth, this point in the following you can more obviously feel.

  1, the main language itself and its advanced features.

The main language is, of course, the guy you get to make money on weekdays. Do not tell LZ you do not have the main language, you will be n many languages, or you are proficient in n many languages, you have to say so, you can come to Hangzhou to try, LZ guarantee not to kill you, most dozen residual.

  LZ's main language is obviously Java, so for Java, its language itself and its advanced features, what is more likely to be asked in the interview.

In general, the following knowledge points are easy to be asked. PS: Here are some Java relatively advanced points of knowledge, because this is talking about social recruitment, not school recruit

  1 Java data structure related to the implementation of the principle of class, such as Linkedlist,arraylist,hashmap,treemap this category. The following simple simulation of a data structure of the serial cannon.

For example, the interviewer first asks you if HashMap is in order.

You must have replied that it was not orderly. The interviewer will continue to ask you if there is a sequential map implementation class.

This is the end of the problem if you say you don't know it at this time. If you say there are treemap and Linkedhashmap.

Then the interviewer may then ask you how treemap and Linkedhashmap are going to keep it in order.

If you can't answer it, that's it. If you still answer the question, the interviewer will continue to ask you which of the two orderly implementations you think are better.

If you are still able to answer, the interviewer will continue to ask you if you think there is a better or more efficient way to achieve it.

If you can say it, then the way you say it will certainly still ask you a lot of questions.

  The above is an example of an interviewer asking a step-by-step question. So, if you do not know much, do not perfunctory, because the next problem you may be exposed, or as a direct say not, the problem is over, quickly switch to the area you are familiar with.

  2 Java and the class in the contract, they all have what role, and their implementation principle, these classes are java.concurrent package below. As with the above, we also simply simulate a and contract the serial gun.

For example, the interviewer may ask you first, if you want to implement all the threads to wait for an event to happen, when an event occurs, all the threads start down together, what is the good way.

At this point you might say you can use a fence (cyclicbarrier in a Java concurrency package), and the interviewer will continue to ask you, do you know how it works?

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

If you can say a number of ways to implement it, then continue to ask you what you think is better in these ways.

If you speak out a certain way better, the interviewer can still continue to ask you, if you want to write, you think there is a better way to achieve it?

If you can still say your own better ways to achieve this time, the interviewer will still be holding this to ask you.

  Why do you want to guide the interviewer when the interview, the reason is here. Because the interviewer's questions are often traceable, if you catch his trajectory and can guess what he might be asking, then you can say it in the direction you want to talk. This interview will appear more leisurely, more comfortable.

  

  3 IO Package and the content in the NIO package. In this part NIO will be the focus, IO package will be more familiar, so you may skip directly, directly ask you the content of NiO.

IO Package and NIO package content is relatively not much, first NIO model to be familiar with, especially the selector must be very clear about its responsibilities and implementation principles. In fact, the core of NIO is IO thread pool, must remember this key point. Sometimes, the interviewer may also ask you the design pattern of the IO package (decorator mode), why you should design this way.

Some interviewers will also ask you if you have a better design, this time if you do not know to be decisive to say that their current level is limited, can not think of a better design, do not casually, random yy.

  

  4 The contents of the Java Virtual machine. This part mainly includes three parts, GC, class loading mechanism, and memory.

A GC part of a simple serial cannon.

  Interviewer can ask you first when an object will be GC.

Then keep asking why you want the object to be a GC at this point in time.

Then continue to ask you what the GC policy is classified.

If you say it, keep asking about the advantages and disadvantages of each of these strategies. are applicable to what scenario.

When you continue to speak out, give you a real scene and let you select a GC policy.

If you pick it up, ask why you chose this strategy.

  here is a simple serial cannon about the class loading mechanism.

  First of all, you must first ask what the Java class loader has.

After you have answered these questions, you may be asked what classes each class loader loads.

After that, you may be asked how the parent-child relationship between these classes is loaded.

You may mention the parent delegation model when you answer, so you can continue to ask what is the parental delegation model.

After you have explained it, you may continue to ask why the Java class loader uses the parent delegation model.

After you have answered the question, you may continue to ask how you can customize your ClassLoader, how your class loader and Java's own classloader relationships are handled.

  Another serial cannon about memory.

  The first thing to do is to ask you which parts of memory are divided, and what data these parts store separately.

Then continue to ask you how an object survives and shifts in these parts from creation to destruction.

Then you may be asked what parts of the memory will be involved in GC recycling.

When you're done, you may also be asked how the Java memory model was designed.

After you answer, you will continue to ask why you are so designed.

When you're done, you might want to talk about the role of the volatile keyword in conjunction with the memory model design.

When you talk about it, you'll definitely mention visibility, and then the three words of visibility, you can continue to ask you concurrent content.

  

  Basically the Java language itself and the language of a slightly higher level of content is the above section, if you can understand the above four parts is very thorough, that basically Java this part of the problem, because the content of light above enough you talk with the interviewer for a long time. You've been chatting about it for a long time, and it's going to be a little shorter when you naturally ask other questions.

you write these questions from the LZ process also should be able to feel out, many times, the interviewer is along a line all the way down, if you think this line you are not familiar with, it is necessary to turn in time to guide the interviewer to ask other aspects of the problem. Never go down deep, until you can not jump out so far, then embarrassed a race.



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.