Effective Java (2nd Edition)

Joshua Bloch (2008)
Review date: October, 2008

The layout of this book is really simple: eleven chapters are made up of 78 "items", topics of discussion. The first chapters treat easier topics, more leaning towards general considerations related to object creation and functionality, and classes. In the middle section there's a lot of Java 5 things going on, like generics, enums, and annotations. Towards the end, things get advanced and topics like exceptions, concurrency, and serialization are treated. Each item is 1-5 pages long, depending on complexity, and may span from quite trivial statements to longer discussions.


When somebody tells me that I can read only a part of a book without caring for the surrounding context, I tend not to believe that somebody, and read the entire book anyway. In the case of this particular book this actually works. The items are quite atomic and rely on minimal cross-referencing, while the sections are really self-contained.

Anyway, at the beginning of the book, I felt like "no, is this the best he can do?", but that changed quickly. While the first items and sections made me feel good about myself, the second part made me question my Java skills. In the latter sections, like the serialization section, the author covers some details that you probably don't have to use in your day to day development. Among these things were some discussions on security. This book doesn't say anything about JVM security, it rather gives examples, here and there, of various ways of breaking and attacking objects. Since I've spent most of my commercial programming time in non-hostile environments, this was sort of a wake up call.

Another feature I can mention, is this book's heavy orientation towards Java 6, which also includes covering a lot of Java 5 ground. I really appreciated the sections on generics and enums, since they got to constitute my best in-depth texts on these topics. Those who have pushed these language elements to their limits may find these sections trivial, however, the majority of readers will find good information in there. What I'm trying to say is that the author delivers on the second edition promise, which makes parts of this book worth reading just for the sake of the Java 5 stuff.

On the whole, my perception is that this book's only flaw is that it really spans between the trivial and common, to the difficult and very specific. How you will perceive this will depend on what subset of the language you have used.

My personal takeaways from this book were: limit use of overloading, auto-boxing may lead to some unexpected behavior when Object is involved, the not so new way of doing concurrency, and finally, things/attacks to consider when implementing serialization.

This list will be different from yours, but yours will sure contain some items when you reach the end of this book.

Finally, a word on my favorite Java literature topic: exceptions. The book contains a couple of items on exceptions, and these pointers are good. However, there's something missing, though it does a better job than most other books. So far, I haven't seen a single book that really takes on this topic properly. Please send me a hint if you know one.

And now, for the final word of wisdom. This book will make you a better Java programmer. It's bound to contain information about things you don't know to greater or lesser extent, depending on your skill. It does contain a lot of idioms and historical explanations. It also gives you another view on the Java API, as it criticizes and explains some design decisions, and revisions made. It's a definitive "read", but with caution.

Who should read this book

Java programmers will become better Java programmers after having read this one, although there exists a minimum level for the programmer to reach before he/she can assimilate all information contained in this book. People interested in some language features and partly evolution of the language will also find some gems here.


  • 2015-09-29

    It's been almost one and a half year since I reviwed a book! I've been too absorbed by Writing my own. Anyway, I'm back with Jeff Patton's relatively...
  • 2014-01-04

    New category! Performance! Reviewed The Every Computer Performance Book. Check it out!
  • 2013-09-10

    Reviewed a book that' slightly less technical, but much more fun to read. It's I.T. Confidential.
  • 2013-08-13

    Reviewed yet another book on Visual Studio 2012 and TFS. I also created a "Microsoft" category and moved the other TFS book there from the "Tools"...
  • 2013-08-05

    Updated the FAQ. Included information about getting a book reviewed.