When looking for a job, you need to interview. If you have an interview, there are ways to deal with it. The following questions come from painful interview experiences that my friends and I had at companies including IBM, E*Trade, Siebel, Motorola, SUN, and other large and small companies.
There is no reason to talk about the interview, and some of its questions are unreasonable and unrealistic. Some will be written on paper, some will test you in person, and some will ask you on the phone. It is estimated that very few will give you an IDE (otherwise, if you hurry up and buy a lottery ticket, you might win). So if you read this article, please don't complain that these problems can be solved with IDE. You must answer these questions accurately under any circumstances. If you answer one or two questions incorrectly during the interview, you may be turned away.
Of course, these are basic Java questions. Most interviewers will not ask you how advanced Hibernate is, the three components of Eclipse, or the command design pattern. They are all older generations, and what they like to ask you most is basic knowledge. . Don't underestimate these basics. My friend is top-notch, but he fell into the problem of basic knowledge and missed a high salary.
Okay, enough nonsense, let’s get down to business.
First, let’s talk about the difference between final, finally, and finalize.
Most commonly asked.
Second, can Anonymous Inner Class extend (inherit) other classes, and can it implement interface (interface)?
Third, the more you can tell about the difference between Static Nested Class and Inner Class, the better (some interview questions are very general).
Fourth, the difference between & and &&.
This is rarely asked.
Fifth, the difference between HashMap and Hashtable.
Ask often.
Sixth, the difference between Collection and Collections.
You must never say one is singular and the other is plural.
Seventh, when to use assert.
API level technicians may ask this.
Eighth, what is GC? Why is there a GC?
Base.
Ninth, String s = new String(xyz); How many String Objects are created?
Tenth, what is Math.round(11.5) equal to? What is Math.round(-11.5) equal to?
Eleventh, what is wrong with short s1 = 1; s1 = s1 1;? What is wrong with short s1 = 1; s1 = 1;?
The interview questions are very perverted, so be prepared to be abused.
Twelfth, what is the difference between sleep() and wait()?
A favorite for threading.
Thirteenth, does Java have goto?
It's a very common question. If any interviewer asks this question, I advise you not to join this company.
Fourteenth, does the array have the length() method? Does the String have the length() method?
Fifteenth, the difference between Overload and Override. Can Overloaded methods change the type of return value?
Ask often.
Sixteenth, the elements in the Set cannot be repeated, so what method is used to distinguish whether they are repeated or not? Should you use == or equals()? What is the difference between them?
Seventeenth, give me a runtime exception you see most often.
If you can't answer this, the interviewer will think that you have no actual programming experience.
Eighteenth, what is the difference between error and exception?
Nineteenth, do List, Set, and Map inherit from the Collection interface?
Twenty, what is the difference between abstract class and interface?
Ask often.
Twenty-one, can the abstract method be static, native, and synchronized at the same time?
Twenty-two, can interfaces inherit interfaces? Can abstract classes implement interfaces? Can abstract classes inherit concrete classes?
Twenty-three, should you use run() or start() to start a thread?
Twenty-fourth, can the constructor Constructor be overridden?
Twenty-fifth, can I inherit the String class?
Twenty-sixth, when a thread enters a synchronized method of an object, can other threads enter other methods of the object?
Twenty-seven, there is a return statement in try {}, so will the code in finally {} immediately following this try be executed? When will it be executed, before or after return? World Computer
Twenty-eight, programming question: Use the most efficient method to calculate what is 2 times 8?
Copyright 2007-2008 Jobhere.Net All Rights Reserved
Programmers with a C background especially like to ask this kind of question.
Twenty-nine, two objects have the same value (x.equals(y) == true), but they can have different hash codes. Is this correct?
Thirty, when an object is passed as a parameter to a method, the method can change the properties of the object and return the changed results. So is it passed by value or by reference?