Author: Joshua Bloch
Publisher: Addison Wesley, 2008
Aimed at: Existing Java programmers
Pros: An important book for Java programmers
Cons: Not for beginners
Reviewed by:Alex Armstrong
This book doesn't set out to teach you Java but to explain a natural way of expressing things in Java. Does this approach succeed?
This is a classic that discussed the way that you should use Java in an intelligent and grown up way. There are no tricks or special effects, just a straightforward approach.
It isn't for beginners of course and you need to be able to program in Java to the point where you can think and reason about ways of achieving something in the best way. It also isn't a book of recipes - although you can't help but read it and take away new ways of doing things.
Just in case you miss the forward the following explains what the book is all about:
If a colleague were to say to you, "Spouse of me this night today manufactures the unusual meal in a home. You will join?" three things would likely cross your mind: third, that you had been invited to dinner; second, that English was not your colleague's first language; and first a good deal of puzzlement.
The author then goes on to say that this is how it often is with programming languages. You might be able to speak Java, but the way that you do it might be more like a second language than something natural. The intention of the book isn't to teach you Java but to explain what seems to be a natural way of expressing things in Java. On the way it also considers and discusses best practices and theories.
It starts out looking at the basics of Java objects - how to create and destroy them, common methods, classes and interfaces, generics, enums and annotations, methods, general programming, exceptions, concurrency and serialisation - all in 11 chapters.
If you care about the craft of writing Java then this is a book you have to read.
If you don't care about the craft of writing Java then give up Java.
Highly recommended to all except the beginner.