Java trap and a basket --- Interview set to find a job, there is an interview with a way to deal with the interview. Some of the following topics come from me and my friend's painful interview experience, including these issues include IBM, E * Trade, Siebel, Motorola, Sun, and other size companies.
There is no reason for the interview, and it is unreasonable, and it is out of practice. Have written on paper, there is a face test you, and there is also a question in the phone, giving you the estimate of the IDE, so you can buy a lottery ticket, maybe it is specified. So if you have finished reading this article, please don't complain that these problems can be solved with IDE. You have to answer these questions in any case, if you have one or two questions in the interview, you will be able to be rejected.
Of course, these are the basic questions of Java. Most people who have interviews will not ask you how Hibernate has more advanced, Eclipse's three components, or Command Design Pattern, they are all aged, and the favorite is basics. . Don't underestimate these foundations, my friend is first-class, and the results are planted under the basis of basics, and the high salary is not worthy.
It's better to say less nonsense and start the topic.
First, talk about the difference between Final, Finally, Finalize.
It is most often asked.
Second, anonymous inner class (anonymous internal class) can be extends other classes, can IMPLEMENTS INTERFACE (interface)?
Third, Static Nested Class and Inner Class are different, the more you say, the better (the interview question is very general).
The difference between fourth, & and &&.
This is very small.
Fifth, the difference between HashMap and HashTable.
I often ask.
Sixth, the difference between Collection and Collectes.
Don't say one is a single one is a plural.
Seventh, when do you use Assert.
API-level technicians may ask this.
Eighth, what is GC? Why have GC?
basis.
Ninth, string s = new string ("xyz"); created a few String Object?
Tenth, Math.Round (11.5) is equal to how much? Math.Round (-11.5) is equal?
Eleventh, short s1 = 1; S1 = S1 1; What is wrong? SHORT S1 = 1; S1 = 1; What is wrong?
The interview questions are very varied, and you must prepare for abuse.
12. What is the difference between SLEEP () and WAIT ()?
Four the favorite of threads.
Thirteenth, have Java goto?
Very thirteen questions, if I ask this question, I advise you still in this company.
Fourteenth, there is a length () method for arrays? String has a length () method?
Fifteenth, the difference between overload and override. Can OVERLOADED methods change the type of return value?
I often ask.
Tenth, the elements in the set cannot be repeated, then what method is used to distinguish whether it is repeated? Is it == or equals ()? What is the difference?
Seventest, give me a Runtime Exception you most often.
If you can't answer this, the interview will think that you don't have practical programming experience.
What is the difference between Error and Exception?
Near 10th, List, SET, MAP inherits from a Collection interface?
Ten, what is the difference between Abstract Class and Interface? I often ask.
Second Eleventh, abstract can be static at the same time, whether it can be native at the same time, is it SYNCHRONIZED?
Typographic
On the thirteenth, starting a thread is Run () or start ()?
24. Is the constructor CONSTRUCTOR can be Override?
The second fifteenth, can you inherit the String class?
Twentydays, after a thread enters an SYNCHRONIZED method of an object, can other threads can enter other methods of this object?
27. There is a Return statement in try {}, then the code in finally {} in this try will not be executed, when is executed, before returnome or after?
Chapter 28. Program: 2 Multiply 8 equal to?
Programmers with C background especially like to ask this question.
The second nine, the two object values are the same (x.equals (y) == true, but there can be different haveh codes, this sentence is wrong?
Thirty, when an object is passed as a parameter to a method, this method can change the properties of this object and return the resulting result, then here is the value delivery or reference delivery?
Thirty-first, whether SWTICH can act on byte, whether it can act on long, can it work on String?
Article 32. Program: Write a Singleton.