Skip to main content

The Wrong Answers

Posted by evanx on October 30, 2006 at 1:04 PM PST

Frank Somerville posted "My Favorite Java Developer interview questions" which i enjoyed reading a minute ago. Here are some answers to avoid ;)

Q. When does the JVM do Garbage Collection?

I got no idea. Who's JVM, is he the janitor here?

Q. What's the difference between an interface and an abstract class?

An abstract class is um, a class that is abstract. An interface is just an interface.

Q. Name the different types of JDBC drivers?

MySQL, PostgreSQL, SQLServer... You want all of them?!

Q. How do I find out how many rows there are in a ResultSet?

Easy. resultSet.length(). No hang on, actually it might be

Q. Does Java use pass-by-value or pass-by-reference semantics?

For what, an int or a String?

Q. What does "NULL" mean in SQL?

Ok, this must be a trick question. If it's not null, um... zero!?

Pick one and answer it, correctly or incorrectly :) Any other good questions?