views:

1226

answers:

8

Hi all,

Could you guys please recommend some good Java books which are good to read before you go to an interview. Ideally the book would cover a lot of core java, including tricky stuff. So books along the line of Java Puzzlers is what I am looking for.

If you got any books to recommend for other areas like SQL, Design Patterns or anything else needed by a Java Developer feel free to do so.

+14  A: 

I think Effective Java by Joshua Bloch is the standard answer for a question like this. It's one of the very few Java books that really stand the test of time, so to speak.

This question is pretty close (at least the answers are likely to be similar):
http://stackoverflow.com/questions/75102/best-java-book-you-have-read-so-far

Edit: this may be valuable too: http://stackoverflow.com/questions/175310/how-to-improve-java-knowledge

Ideally the book would cover a lot of core java, including tricky stuff. So books along the line of Java Puzzlers is what I am looking for.

I'm tempted to add that hopefully you won't be asked too many "trick" questions (along the lines of Java Puzzlers) about Java in an interview. That book contains interesting, good-to-know stuff, but I'd really like to think that in an interview (at any development team worth working in, at any rate) they will be more interested in how well you've grasped the most important practices and essential idioms about Java development - not just the "traps and corner cases" - and that is exactly what Effective Java covers. :-) I recommend that you read the foreword by Guy Steele, by the way.

Jonik
+4  A: 

If I was conducting a new graduate interview, I wouldn't really expect you to be writing Java code on a whiteboard or anything, instead, focus on hardening your core Java skills. The Sierra-Bates SCJP 6 book is great for not only studying for certification, but making sure you know all the core concepts of the language.

If you're interviewing for a senior developer role, I would check out some O'Reilly books on Spring, Hibernate, JSP, basically anything outside the core language. In this case you need to be able to show you know the concepts but can also implement them effectively.

No matter what though, sit down in front of your favorite IDE while reading these books. Try all the examples, it really helps to code them by hand.

If you know the core language, it's tough to be tricked, and if someone won't hire you because you didn't know when to use a PriorityQueue's offer instead of add, that's messed up.

Greg Noe
+1 for Sierra-Bates book (it's good to know Java language foundations well - although in general I think for an interviewer it would make more sense to ask the kind of questions that Effective Java would help you answer, instead of constructor execution order details, etc), and hands-on practise
Jonik
I got 10 years of experience with java, I just want to brush up on the some of the trick questions really :)
willcodejavaforfood
+1 for Sierra-Bates
mjustin
A: 

I'll second Jonik's vote for Effective Java. I first read it after working with Java for nearly 10 years and I still found a few things I didn't know. It doesn't teach you how to code in Java as it's not a book for beginner programmers. If you are however moving from another language or have spent some time learning Java it contains a wealth of useful information about how to code - as the title promises - effectively.

The chapter on exception handling is particularly good. I wish I had read that years ago instead of learning all that via trial and error.

Kris
+3  A: 

The SCJP study guide is a good book to prepare for interviews. Even if you never plan to get the certification, the book covers a lot of information you should know if you want to work with Java.

Bill the Lizard
Jonik
@Jonik: I was updating my answer as you commented. Thanks.
Bill the Lizard
I used this too for all my interviews, it's great. Lots of little things you never knew are all over the place in there.
Alex Beardsley
+1  A: 

If you need quickly refresh your java knowledge try to use this one Java/J2EE Job Interview Companion

andrey
Wow, a Java book specifically to help you make an impression in an interview. :P From pure 'learning more Java' point of view, surely not the best use for your time, but I guess it may really help in interviews (esp. if you're not as experienced as you claim). Quite precise answer to this question!
Jonik
A: 

Here is my list:

  1. Effective Java
  2. Java Puzzlers
  3. Thinking in Java

For a quick and to the point reference of Design Patterns please refer to: dofactory.com

Faisal Feroz
A: 

I suggest you start with the online http://www.google.co.uk/search?q=java+interview+questions 390,000 hits. This covers many of the questions you will get asked.

Peter Lawrey
I am interested in books so I have something to read on the train.
willcodejavaforfood
You can find interesting web pages and print them out.
Peter Lawrey
A: 

The way I prepare for interview is I get the most frequently asked questions from Google. The most frequently asked questions are the most important concepts of any technology, otherwise they would not have been asked again and again.

After that I try to find the answer myself by referring to API, books or online tutorials and compare the answer.

I would add the following website that contains a list of questions in a structured manner:

www.developersbook.com

Priyabrata Hota