I was interviewing with a "too proud of my java skills"-looking person.


He asked me "What is your knowledge on Java IO classes.. say.. hash maps?"
He asked me to write a piece of java code on paper - instantiate a class and call one of the instance's methods. When I was done, he said my program wouldn't run. After 5 minutes of serious thinking, I gave up and asked why. He said I didn't write a main function so it wouldn't run. ON PAPER.
[I am too furious to continue with the stupidity...]


Believe me it wasn't trick questions or a psychic or anger management evaluation thing.

I can tell from his face, he was proud of these questions.

That "developer" was supposed to "judge" the candidates.

I can think of several things:


Hit him with a chair (which I so desperately wanted to) and walk out.
Simply walk out.
Ridicule him saying he didn't make sense.
Politely let him know that he didn't make sense and go on to try and answer the questions.
Don't tell him anything, but simply go on to try and answer the questions.


So far, I have tried just 4 and 5. It hasn't helped. Unfortunately many candidates seem to do the same and remain polite but this lets these kind of "developers" just keep ascending up the corporate ladder, gradually getting the capacity to pi** off more and more people.

How do you handle these interviewers without bursting your veins? What is the proper way to handle this, yet maintain your reputation if other potential employers were to ever get to know what happened here? Is there anything you can do or should you even try to fix this?

P.S. Let me admit that my anger has been amplified many times by the facts:  


He was smiling like you wouldn't believe.
I got so many (20 or so) calls from that company the day before, asking me to come to the interview, that I couldn't do any work that day.
I wasted a paid day
off.


Laugh along with him.

"Oh yes!  No main() function.  Also, it's written on a piece of paper, which couldn't execute code anyway.  And I forgot to draw a 'Compile' button.  Ho ho, we're funny guys!"

Then try to move onto the next question.  Yes, he is nit-picking, but it's really nothing to get upset about.

Make it apparent that you think the answer he was looking for was so obvious to you that you didn't think it worth mentioning.  He's probably interviewing a range of candidates from programming geniuses through to people who've never programmed and are just desperate for a job.  Sometimes as an interviewer it's worth checking the obvious.
