Graeme Ahokas

Software developer and Project Manager

Grokking the Java Interview - Book Review

Javin Paul’s book Grokking the Java Interview is a broad range of Java-based topics intended to assist Java developers prepping for the interview process.

What’s in the book

The book contains 159 pages of Java questions that a Java developer would (ideally) be able to answer. Topics include:

Following each question there is a short paragraph explanation or answer.

Who is this book for

You are

Who is it not for

You are


I am a senior Java developer with 12+ years of Java-specific experience, and the first time through the book, I didn’t know, or didn’t have at least some idea on, about half of the answers. The breadth of topics covered is just so vast (as is Java itself) and I don’t have to use (regularly) many aspects of the language in my day to day work (ex concurrency, some design patterns, and garbage collection specifics). I could easily spend an hour a night for a month or two going through the questions and investigating the answers. Some questions are quick (Can a class extend more than one class?), some can take many hours of learning to work out a solution (How do you solve to the Producer / Consumer problem).

I found that sometimes the answers to the questions aren’t complete, but rather guidance on the approach required to solve the problem. This means you can’t just read the book front to back and “know” the answers to the questions. Many questions require the reader to open up a code editor to test, experiment, and learn the answer for themselves. This is the only way to truly “learn” and internalize the answers anyway. Just memorizing the answers without understanding does you no good.

Bottom line

I think for a developer just learning Java, the book might be a little intimidating. But if you have some Java experience, and want to use the book as a checklist to ensure you’re aware of the majority of topics related to core Java prior to a technical interview, this book is an excellent tool for that.

Sample Questions (and my answers)

Here are some sample questions I found tricky (or just didn’t know or remember) along with some code I wrote as I investigated the answers.