views:

15185

answers:

30

What are the best questions to ask when running a technical interview for a senior level j2ee developer?

+1  A: 

Fizz Buzz is always a good one.

It's not J2EE specific, but it will separate the wheat from the chaff.

cazlab
+2  A: 

Ask about the various database locking schemes and how you set them in Java. Ask about EJB interceptors. Ask about durable messages.

jodonnell
+11  A: 

Can an interviewee design good software? Rather than, can an interviewee swap two ints without using a third temp variable?

Basically what I'm saying is that silly puzzle questions are not as important as real-life questions.

jjnguy
I don't see how this relates at all to the question. Knowing how to swap two variables using addition and subtraction without using a temp variable has nothing to do with a programmers knowledge of application design concepts in Java J2EE.
ScArcher2
I clarifiedd my meaning in the answer.
jjnguy
ah much better :)
ScArcher2
+7  A: 

It may seem odd for a senior position but make sure to have your interviewee solve a somewhat challenging problem by actually writing code on the whiteboard. There is no easier way to really assess the skill of a programmer (especially a senior one) than seeing her think through a problem and scribble some basic code. You will be surprised how many people you can weed out with this simple test.

jW
+18  A: 

With senior guys, after you've asked the pesky "what is the difference between an abstract class and an interface" type questions and had them write some code on the board, my preference is to have a conversation with them about application architecture. When do you use different design patterns, what are the strengths and weaknesses of various models, how do you balance scalability, reliability, responsiveness, and so on. Don't make this a quiz -- make it a conversation and let it go where it takes you. This is a much easier way to figure out whether the candidate has really done what he's talking about, as opposed to having read about it.

Jim Kiley
+2  A: 

Ask about transactions (how, why), exceptions and the different behaviour scenarios one can end up with. I found that to be a challenge for a lot of (even senior) J2EE people.

Andrei
+3  A: 

"Can I see some of your code?"

Clarification:

I wouldn't imagine asking them to login to their past/current employers system and pulling code out of the repo.

I am assuming any competent programmer writes more code than what they do at work.

databyss
Any competent senior person should laugh and say "would you want me to share code I write for you with other companies?"
Rob Elsner
It is tricky to answer this question unless you are involved with an open source project.
fastcodejava
I don't think this is fair to ask of someone. How would you feel I showed another company your companies' code. I also worked for a financial institution and I know they don't me showing off their code.
Ben
A: 

Please describe the MVC design pattern and any related patterns.

Anyone who doesn't come up with "Observer / Observable" and can explain why is right out for me. That pattern is way to simple and way too useful and way to pivotal to MVC to be missed.

+4  A: 

Ask them about their knowledge of development process. They're not senior if they think you "just hack away".

Beyond that, ask them about testing, tuning, monitoring, systemic qualities (scalability and scaling, maintainability etc.).

Andrew Harmel-Law
+1  A: 

Ask them at least some questions that haven't been posted on the web as an interview questions so that they won't know ahead of time what the best answers are.

James A. N. Stauffer
+1  A: 

Ask enough questions so they will say something like "I don't know but I can learn."

James A. N. Stauffer
A: 

Describe the details of a past project. (Make sure they can answer details clarification questions.)

James A. N. Stauffer
+3  A: 

J2EE is too broad for anyone to know it all in detail so don't expect them to know any specific area in detail (unless it is imperative that they use that area immediately) but do expect them to know a few areas in detail.

James A. N. Stauffer
+2  A: 

What Unit Testing framework do you use? If they don't you, don't need them. What is the version control system you use? If they don't, you don't want them. Why would you choose Beans over Portlets? If they answer this question you really don't want them. A senior person would immediately state that these approaches are obsolete and should not even be a choice to start with.

Vasco Duarte
A: 

Ask about their passion for programming. Why do they like programming? What kind of programming do they like best? Why did they become a programmer? Why did they start and end their last positions?

James A. N. Stauffer
+3  A: 

A good way to approach interviews like this is to ask:

  1. What is good about a relevant technology that is currently much maligned.
  2. What is bad about a relevant technology that is currently being hyped
  3. The fine detail of technologies that are relevant in a small (but relevant) number of cases.

JEE specific examples would be:

  1. When would you advocate building an application based around RMI and EJB?
  2. What would worry you about adopting Spring as your Dependency Injection tool?
  3. What types of application require remote management and how would you approach this using JMX?
  4. Under what circumstances does the default JEE security model prove inadequate and what alternatives would you suggest?
Garth Gilmour
A: 

Ask about Spring vs. J2EE.

landon9720
+2  A: 

In our shop seniors have dual responsibilities. Knowledge of programming/design standards is important but I've found that what really separates people is their ability to work with others on the team who are both senior and junior level. I'd ask them to describe a previous team coding experience and the worst team interaction they have experienced. At the very least you might find out what they deem worthy of arguing over.

EmperorMing
+3  A: 

How does garbage collection work?

How do you create a thread dump?

How do you profile an application?

What's new and/or up and coming in the industry?

What are you weaknesses?

What frameworks would you use to develop your dream application?

Kevin
Yep, those are interview questions.
jim
+1  A: 
  • Which JEE framework do you like the least and why?
  • When is it a good idea to use IoC?
  • What languages/platforms other than Enterprise Java have you used recently, and what did you do with them?
  • Is there a design pattern or language idiom that you think is overused? Why?
  • When would it be a good idea to use an ORM framework? When would you avoid one?
  • What techniques have you employed to monitor production systems?
Mike Desjardins
A: 

I tend to ask a few basic technical things about boring things like design patterns, and ask them to cite examples in the Java API where those java examples are. A lot of the questions listed previously are fantastic!

For a senior engineer I personally tend to concentrate on soft-skills more than anything. A senior engineer should display strong leadership and technical skills, not just technical skills.

Some questions about difficulties on previous projects and what was done to deal with them. Dealing with difficult people and how to motivate them etc. etc.

I think when you get to a senior level you can probably pick up a new skill quite quickly, however the best senior engineers are the ones that can manage people, and especially teams of people, who can mentor others, who aren't afraid of dealing with customers and public speaking, and who will contribute positively to a team. I've seen some teams go downhill really fast when you get some really talented technical people who have no soft-skills whatsoever.

Technical skills are important, but the higher up you go the other skills become as (or even more) important.

A: 

How do you make a class thread safe?

Stephen Denne
+1  A: 
  • What are the main benefits of using Spring on a project ?
  • What is AOP ?
  • How hibernate implements lazy loading ?
  • What is the second level cache in Hibernate ?
  • What are the main new features of Java5 ? Same question with Java6 ?
Alexandre Victoor
A: 

I think senior needs an ability to find non-standard solutions. So one of my questions would be

  • What would you do if for some reasons you can not use any database?

Another senior's skill I think is knowlege what is right and wrong and why. So my question would be

  • Analize given application and tell me what is wrong with it.
  • What could be better in JDK or J2EE?
  • What was your biggest bug in last year?

One more important senior's skill I think is ability to share his knowlege with juniors. So my question would be:

I'm junior and

  • Tell me what Spring (EJB, Hibernate) is for. Don't forget, I'm junior. Dependency injection - wtf is that?
  • What's wrong with my class with 50 static methods? They work!
  • Requirements say I need a logo in the header on every page. So it is requirements duplication, not code duplication. What's wrong with it?

Communication with management is also very important, so I'm your manager and I wrote my last line of code in university 10 year ago and

  • Tell me why did you decide to use REST instead of SOAP in this project? Don't bother me with technical details, tell me how do we earn money on it.
Pavel Feldman
@Pavel, Can you please explain if I declare any class with 50 static methods, do they have any performance issues?
harigm
@harigm, no, I don't think they have any performance issues. That class MAY have some design issues though
Pavel Feldman
A: 

Some of my favorite questions a) What is System.out.println . Break up eaah word and explain to which class or interface they belong b) result Set , class or interface c) x no of users are connected to a website. I want to increase the load 10x . How I make sure my site is able to handle 10x load ?

Some other questions can be found at Skill-Guru

vsingh
+3  A: 
  1. What is the flaw with the Stack class?
  2. Explain the Java Class loader mechanism. How would you prevent someone from overriding the java.lang.Object class?
  3. Can interfaces contain inner classes?
  4. Explain how you would get a Thread Deadlock with a code example?
  5. What happens when you try to serialize a class whose base class does not implement serializable?
  6. What happens if you try to pass an int variable to a function that accepts only:
    a) long b) Double() c) Number() ?
  7. How can you prevent flow of control to a finally { } clause?
  8. I write two classes : I write a static method in the base class and override that static method in the child class. Will this code compile?
  9. Write a program that prints a.b.c.a.b.c...and so on 100 times using threads?
  10. What happens if you try to start a thread thats already been started?

Some of these may be thinkers!!!

Sebulba
+1  A: 

I like to think of a problem that I've had to solve, or maybe make one up, that has a lot of different solutions. When the candidate comes back with one answer, I say "well what about if this was the case..." and see how they respond. I think it's a good way to get a feel for how broad of a range their knowledge covers and how well they can think on their feet.

Lately what I've been asking in this vein is... "let's say I had a web application with a large number of URLs... and I wanted to log every time a user visited a page in the member section, with the url path starting with '/member'. How would I do that?"

bpapa
@bpapa, can you share your answer on your question please?
harigm
There really is no answer, I ask that question to see how well a developer understands web technology. Do they know about how HTTP works? Do they know about how to pull this kind of info from a web or app server? Do they know what they can accomplish with Javascript, or using advanced features of a language or framework? In a lot of cases, they'll say how to do it one way, and then I come back with - "OK so you said let's check the Apache logs, but let's say you aren't allowed access to those due to privacy concerns..."
bpapa
+1  A: 

What are the differences between various frameworks:

  • Struts vs Wicket
  • Spring vs EJB
  • Hibernate vs iBatis
fastcodejava
A: 

You should have go through these Excellent Java,J2EE Interview questions with answers

Sarah Nasir