Book: Effective Java

28.Sep.2008

Effective Java (2nd Edition) was the book I picked up when I was looking for a more advanced book on the Java programming language. The book covers all its important issues: Classes, Interfaces, Methods, Generics, Concurrency, Exceptions, etc… But unlike the normal Java books, it doesn’t teach you how to program. It’s a collection of best practices.

The book is structured as a large list of items. Each item corresponds to an advice or best practice. For example: Consider static factory methods instead of constructors, Make defensive copies when needed and Return empty arrays or collections, not nulls. What I liked most is that it doesn’t just tell you what to do. The author carefully explains all the pros and cons of such a decision. First learn the rules, then learn when to break them. This second edition already covers the Java 6 version, so there are some interesting chapters on Generics, Enums and Annotations. Additional, some of items’ solutions point to known Design Patterns, so it’s also a change to learn a bit about them.

I believe this book should be a requirement for every Java coder doing serious programming. Some of the practices advocated may seem unusual, but all aim for better maintainability and code comprehension, a worthwhile goal for every programmer.

The complete list of reviewed books.

If you enjoyed this post, consider subscribing to my RSS Feed RSS feed icon

Sorry, comments are closed for this article.

Follow this post comments with this RSS feed.