A job interview can be scary at the best of times. In the current economy,
the process is even more intimidating. What sort of questions would you
expect? What level of discussion are you likely to enter into in a Java
interview? You the readers responded with a wonderful array of
questions.
Warm Up Questions
How many interfaces can an interface extend?
Hugh McBride
Is Java fully object-oriented? If yes, why?
Yogaraj Jayaprakasam
Explain garbage collection in Java and the impact upon memory usage and
performance in two of the common algorithms for determining when the space
allocated to objects can be returned to free storage.
Harry Kaplan
What is the difference between wait and sleep and why is it important?
Martin Smith
Can you store null in a Hashtable?
Fatih Karakurt
How do you allocate memory in Java?
Ratan
What are the four modes of access protection in Java, and how do they
behave? What's special about "protected" access?
Bruce Wilson
Java as a Language
Given the opportunity to dictate changes for the next Java release, what
would you fix?
Brian Gentry
How do you deprecate a method?
John Davies
What is the difference between overloading a method and overriding a method?
Vikrant
What is reflection? When would you use it?
Jill Qian
How do inner classes impact OO design? Do they help create better OO
designs?
Mohan Radhakrishnan
Design-Type Issues
Assuming you know the philosophy of the Java object model, the syntax of the
Java language, how to use the Java platform, and the semantics of the
specific APIs that are pertinent to the job you are seeking how do you
decide what to do when confronted with a need for new functionality?
Lee Hall
An interface doesn't contain any implementation. Why would you want to use
it?
Dushyanth Inguva
What's an immutable object? What are some examples? Why is immutability
important in Java? How would you create an immutable class?
Bruce Wilson
If you needed to hold a collection of objects within a class, how would you
do it?
David Kavanagh
How can you leverage the salient features of Java to create an extensible
and pluggable component framework?
David Forden
Political Questions
Where do you see Java in relation to other languages and development
environments? What are its strengths?
Scott Frazor
What three things would you most like to change about the Java language? Not
API stuff like "make AWT/Swing faster," but rather language-level specifics
such as the assertions that were recently added or the semantics of
public/private/package visibility.
Eric Rizzo
Assuming you'll only deploy on Windows platforms, give three reasons why you
would choose Java instead of C#.
Jim Long
Summary
These questions covered all facets of Java, and we presented a few here
so you would know what to expect. If you recently had an interview, we'd
love to know the sort of questions you were asked.
. . .
Access the full list at
www.n-ary.com/java/jdj/askjdj_question.cfm?JDJ_ID=2.