Effective Java Second Edition is Also Worth a Read

A long time ago, I read the first Effective Java book by Joshua Bloch, and, as many others, I loved it. Great book! Not long ago, Joshua Bloch finished a revised second edition of Effective Java, and I just finished reading it.

When I ordered the book, I was unsure if it would be a waste of time. Was there really so much new to say about the Java platform, since then? After all, this book is all about best practices and common idioms for programming on the Java platform. How many new such could there be?

Well, quite a few it turned out.

There are completely new chapters, like the 37 pages on generics and the 33 pages on enums and annotations, as these are language features added in Java5.

In addition to this, a great deal of the old items have been heavily revised, to accomodate the new features, as there are now better ways to do things. One example is the advice to use enums for singletons. Another is the advice to prefer Executors over working with threads and to prefer concurrency utilities like CountDownLatch, CyclicBarrier, etc. over wait and notify. All new stuff from the java.util.concurrent package.

I can only say, that second edition is a must-read too.

Next up for me is Java Puzzlers, which I never got around to reading.

August 27, 2008  Tags: ,   Posted in: Uncategorized

One Response

  1. Michael - September 17, 2008

    Java Concurrency in Practice is even better when it comes to … concurrency. Surprise, surprise. Bloch had a hand in that one too. Java Puzzlers is a fun book. When I read it, I would post one puzzler per day to all the programmers in my company. Everyone would try to solve it, it was both fun and a learning exercise for the team.

Leave a Reply