From the original electrical surface, to the later Chuanjiang, and then to the technical side later, all the way, feeling quite deep, today put these things out, hoping to be and ready to find a job for the students to provide some reference.
Before getting to the point, a piece of crap, no good Java foundation of the classmate how to do, take it easy, from the beginning you see this log, the whole heart to spend three weeks of time, find a page in 250 pages within the Java textbook (more than 250 pages of books unless you are 250, Otherwise it will be difficult in three weeks to get it done), to seriously look, honest practice.
The next thing to say is the common interview problem, the premise is to have Java Foundation, otherwise see also useless, no Java Foundation, there will be no interview opportunities (will be &*%* in the written test).
Java technical interviewing is generally divided into two parts, Java Foundation and Web development (also known as the legendary EE).
Java fundamentals, common knowledge points are: Java basic concepts, exceptions, collection classes, multi-threading, streaming, network programming
// **
* Basic Concept article
// *
1. What are the basic features of object-oriented?
Encapsulation, inheritance, polymorphism, specific content Baidu a bit. If possible, please add the abstraction, about the basic characteristics of this thing, some people say three, some people say four, it is best to prepare.
2. Talk about the difference between object-oriented and process-oriented.
The basis of comparison, did not say.
3. The difference between int and integer
The base type and wrapper class, the value of int must be a valid integer number, and an integer is an object that can be null.
4. Eight basic data types.
C-language stuff, don't say anymore. Remember that string is not the base data type.
5. String and StringBuffer, StringBuilder
Baidu is interpreted as follows, comparing the standard: the stringclass is a constant of strings and is immutable . While Stringbuffer/stringbuilder is a string variable, its objects can be expanded and modified.
I'll add that when string changes are made, strings often need to create new objects, memory overhead, and StringBuffer and StringBuilder are much more efficient, because their objects themselves are mutable. In addition, StringBuffer is thread-safe and StringBuilder is a non-thread-safe version of StringBuffer, in the usual programming (in the case of thread safety five requirements), it is recommended to use StringBuilder as much as possible.
6. Scope public,private,protected, and differences when not written
Needless to say, I can see, emphasize two points.
First, does not write, is the package access permission, namely the class inside and the same package method can access, for the different package, even is the subclass, also cannot access, this and protected have the essential difference.
Second, the private property of the parent class cannot be accessed by the quilt class, but the subclass can read and write to the property through the get and set methods that the property declares to public in the parent class.
// **
* Exception article
// *
1. Simple principle of exception handling mechanism in Java
Myself to check, at the time of the interview, I am very straightforward and honest to tell the interviewer I do not know, but I also let him know that I have a wealth of exception handling experience and good exception handling principles.
In the interview, you can not meet the principle or concept, it is OK, as long as you use, you may talk about your use experience, the most important thing is, let him know, elder brother just can't principle, but brother more understand practice.
2. Talk about the difference between runtimeexception and checkedexception.
There are many more versions of the problem, such as asking you checkedexception and uncheckedexception.
The discussion of this issue is a never-ending dispute, Baidu, you will find a lot of people in the use of that kind of exception very tangled, tangled that what hurts.
But it doesn't matter, the interview, the interviewer will not let you that pain, you just talk about the basic difference is OK.
RuntimeException is a run-time exception, and exception is a non-run exception, which is a check-type exception (checkedexception).
Run-time exceptions are hard-to-detect exceptions during compilation before running, such as subscript out-of-bounds, except for 0 exceptions, null pointers, and so on. This type of exception can be handled (captured) or not handled by the client (where the method is called).
A check-type exception can be determined before it is run, for example, when you assign a bull's reference to a horse, which is called irrelevant. For this type of exception, the client must process, either capture, or throw up.
3. The difference between error and exception
This does not tangle, own Baidu to find (seemingly to Baidu did a lot of ads ^ ^).
4. try...catch...finally
Also not tangled, oneself to * * find.
5. The difference between finally and final
The two brothers have nothing to do but look alike.
Finally did not say, see final.
The goods to whom, who either childlessness, or invariable.
How to say, the final modified class, cannot be inherited, no subclasses, the most typical example is a string.
The final modified method cannot be overridden by the quilt class during inheritance.
Final modified properties, the first must be initialized, the second cannot be changed (basic types and constants do not change values, objects do not change references). You can override the same type property with the same name as the quilt class, and if overridden, the feature that is final decorated ceases to exist.
// **
* Collection Class
// *
Do not know the collection class is what, should go to wall.
1. The difference between ArrayList, linkedlist and vectors.
Own Baidu.
2. The difference between Map, Set, list.
Own Baidu.
Collection class problems are relatively centralized, but also relatively good, this kind of problem online a search a lot of, I do not nonsense, continue down.
// **
* Multithreading
// *
The implementation of multithreading, in general, can inherit from the thread class, or implement the Runnable interface,
This piece of stuff, take a look, write a few lines of small code on the OK.
In addition, some thread-safety issues may be asked. The so-called thread-safe, simply speaking, is that multiple threads simultaneously access a variable generated by the conflict problem, this self-check data, one or two words are not clear. If you want to go deeper, recommend Java concurrency Programming practice. Here is not recommended in-depth, for the school interview, this is not the focus of investigation. Even if the test, it is also a very basic thing.
// **
* Network programming and streaming
// *
Also are cicatrization, interview time, seemingly did not have too many typical problems, but if asked, must answer, this is must drop.
As for the Java EE part, I'll make it up when I have time. Design mode part, at least to know Singleton, this basic to is a person can talk, so have to, in addition, at least to understand a, lest others interview officer asked you design mode when the cold, recommend to see Template method mode and observer mode, relatively simple, easy to get started.
Java Basic section, if asked to the class loader, this is the problem of the Ashes level, it will not matter, as far as I know, there are many experienced programmers are not necessarily clear.
On this, time is limited, simply say, if there is insufficient, but also hope forgive me. If you find anything else to add, don't forget to remind me.
Feel useful collection, useless sharing, hope that everyone can find the satisfactory job soon!
The questions listed above are the most frequently asked questions in the interview and hope to help.
Basic knowledge of Java job search