What are the best questions to ask when running a technical interview for a senior level j2ee developer?
Fizz Buzz is always a good one.
It's not J2EE specific, but it will separate the wheat from the chaff.
Ask about the various database locking schemes and how you set them in Java. Ask about EJB interceptors. Ask about durable messages.
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.
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.
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.
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.
"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.
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.).
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.
Ask enough questions so they will say something like "I don't know but I can learn."
Describe the details of a past project. (Make sure they can answer details clarification questions.)
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.
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.
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?
A good way to approach interviews like this is to ask:
- What is good about a relevant technology that is currently much maligned.
- What is bad about a relevant technology that is currently being hyped
- The fine detail of technologies that are relevant in a small (but relevant) number of cases.
JEE specific examples would be:
- When would you advocate building an application based around RMI and EJB?
- What would worry you about adopting Spring as your Dependency Injection tool?
- What types of application require remote management and how would you approach this using JMX?
- Under what circumstances does the default JEE security model prove inadequate and what alternatives would you suggest?
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.
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?
- 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?
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.
- 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 ?
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.
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
- What is the flaw with the Stack class?
- Explain the Java Class loader mechanism. How would you prevent someone from overriding the java.lang.Object class?
- Can interfaces contain inner classes?
- Explain how you would get a Thread Deadlock with a code example?
- What happens when you try to serialize a class whose base class does not implement serializable?
- What happens if you try to pass an int variable to a function that accepts only:
a) long b) Double() c) Number() ? - How can you prevent flow of control to a finally { } clause?
- 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?
- Write a program that prints a.b.c.a.b.c...and so on 100 times using threads?
- What happens if you try to start a thread thats already been started?
Some of these may be thinkers!!!
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?"
What are the differences between various frameworks:
- Struts vs Wicket
- Spring vs EJB
- Hibernate vs iBatis
You should have go through these Excellent Java,J2EE Interview questions with answers
This site has got tons of questions : http://kamoor.com/javainterview/blog/20100720-j2ee-interview-questions-1-java-jsp-servelets-ejb-questio