Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

Overview

Are you looking for a deeper understanding of the Java™ programming language so that you can write code that is clearer, more correct, more robust, and more reusable? Look no further! Effective Java™, Second Edition, brings together seventy-eight indispensable programmer’s rules of thumb: working, best-practice solutions for the programming challenges you encounter every day.

This highly anticipated new edition of the classic, Jolt Award-winning work has been thoroughly updated to cover Java SE 5 and Java SE 6 features introduced since the first edition. Bloch explores new design patterns and language idioms, showing you how to make the most of features ranging from generics to enums, annotations to autoboxing.

Each chapter in the book consists of several “items” presented in the form of a short, standalone essay that provides specific advice, insight into Java platform subtleties, and outstanding code examples. The comprehensive descriptions and explanations for each item illuminate what to do, what not to do, and why.

Highlights include:

  • New coverage of generics, enums, annotations, autoboxing, the for-each loop, varargs, concurrency utilities, and much more

  • Updated techniques and best practices on classic topics, including objects, classes, libraries, methods, and serialization

  • How to avoid the traps and pitfalls of commonly misunderstood subtleties of the language

  • Focus on the language and its most fundamental libraries: java.lang, java.util, and, to a lesser extent, java.util.concurrent and java.io

Simply put, Effective Java™, Second Edition, presents the most practical, authoritative guidelines available for writing efficient, well-designed programs.

Subscriber Reviews

Average Rating: 4.75 out of 5 rating Based on 68 Ratings

"It's a good book, and thorough." - by Anonymous on 12-JUL-2012
Reviewer Rating: 1 star rating2 star rating3 star rating4 star rating5 star rating
This is a very useful collection of techniques and strategies for designing classes, methods, and APIs in Java.  I'm sure I will be referring to this on an ongoing basis, and I look forward to future editions.

My complaints:

- The ordering of the Items can be frustrating when in the middle of one item we are referred to another in a completely different part of the book, and the discussion assumes that other item has already been read and digested.  I would hope that the material could be ordered a bit more logically.

- The style, while it has enjoyable humorous moments, is very, very dense and can be at times off-putting to the reader.  It can almost seem like the reader is being lectured *at*.

In conclusion, this volume is an immense resource and I am grateful to have been able to read it.  Thanks, Josh!

Report as Inappropriate

"My all time favorite book" - by Anonymous on 03-FEB-2012
Reviewer Rating: 1 star rating2 star rating3 star rating4 star rating5 star rating
It goes over many different areas in Java, and captures some of the most elegant solutions to common day to day problems most developers encounter. Highly Recommended..
Report as Inappropriate

" Good Book" - by Shamal Jayakody on 12-OCT-2011
Reviewer Rating: 1 star rating2 star rating3 star rating4 star rating5 star rating
One of the best Books on good programming practices. Joshua Bloch was a good PhD Student at Carnegie Mellon. He developed Collections framework for Java at Sun. It may be over-designed.
Report as Inappropriate

"Effectiv Java" - by Anonymous on 25-AUG-2011
Reviewer Rating: 1 star rating2 star rating3 star rating4 star rating5 star rating
Gives good explanations.
Report as Inappropriate

"From proficient to expert: read this book!" - by Christopher on 18-FEB-2011
Reviewer Rating: 1 star rating2 star rating3 star rating4 star rating5 star rating
Having coded in Java for many years, I would consider myself an expert.  I read the first edition of this book a long time ago and felt I knew quite a bit.  When I first saw this book, I scanned the contents and thought, "I know this stuff - little difference from the first edition".

However, knowing that Joshua Bloch is a Java Guru and has a very readable and enjoyable style, and having very much enjoyed the first edition, I thought I would give it a try anyway.

Was I surprised.  While there are places where I have said to myself "I know this", there were many more places where I said, "Huh...I did not know this.  Good thing I'm reading this".  There truly are gold nuggets of knowledge in here.  If you are a serious Java coder who really wants to know the best way to use the language, you cannot avoid this book--even if you have read the first edition.  Joshua has added advice due to the language changes since 1.5 and has other advice as well.  And you need to read every word, both as a refresher (I didn't forget some points) and as an upgrade due to the growth in the language.

In fact, some of the advice here transcends languages can could be applied to .Net and other languages.  But all-in-all this is a Java focused book and worth the time to read.  In fact, I am certain you will need to read it more than once to soak it all in thoroughly.  And if you don't, you will want to refer to it several times in the coming years.

Report as Inappropriate

Table of Contents

 Index