Join Amazon Prime and ship Two-Day for free and Overnight for $3.99. Already a member? Sign in.
Effective Java and over 300,000 other books are available for Amazon Kindle – Amazon’s new wireless reading device. Learn more

 

or
Sign in to turn on 1-Click ordering.
 
 
More Buying Choices
80 used & new from $34.50

Have one to sell? Sell yours here
 
   
Effective Java (2nd Edition) (Java Series)
 
 
Start reading Effective Java on your Kindle in under a minute.

Don’t have a Kindle? Get yours here.
 
  

Effective Java (2nd Edition) (Java Series) (Paperback)

by Joshua Bloch (Author)
Key Phrases: executor framework, collections framework, default serialized form, Null Poi, Wed Apr, Standard Edition (more...)
4.9 out of 5 stars See all reviews (35 customer reviews)

List Price: $54.99
Price: $44.40 & this item ships for FREE with Super Saver Shipping. Details
You Save: $10.59 (19%)
In Stock.
Ships from and sold by Amazon.com. Gift-wrap available.

39 new from $38.07 41 used from $34.50
Also Available in: List Price: Our Price: Other Offers:
Kindle Edition (Kindle Book) $28.79

Frequently Bought Together

Effective Java (2nd Edition) (Java Series) + Java Concurrency in Practice + Java(TM) Puzzlers: Traps, Pitfalls, and Corner Cases
Price For All Three: $118.18

Show availability and shipping details


Customers Who Bought This Item Also Bought

Core Java(TM), Volume I--Fundamentals (8th Edition) (Sun Core Series)

Core Java(TM), Volume I--Fundamentals (8th Edition) (Sun Core Series)

by Cay S. Horstmann
4.4 out of 5 stars (17)  $37.79
Java(TM) Puzzlers: Traps, Pitfalls, and Corner Cases

Java(TM) Puzzlers: Traps, Pitfalls, and Corner Cases

by Joshua Bloch
4.5 out of 5 stars (30)  $35.99
Head First Design Patterns

Head First Design Patterns

by Elisabeth Freeman
4.6 out of 5 stars (275)  $29.67
Core Java, Vol. 2: Advanced Features, 8th Edition

Core Java, Vol. 2: Advanced Features, 8th Edition

by Cay S. Horstmann
3.7 out of 5 stars (7)  $37.11
Java Generics and Collections

Java Generics and Collections

by Maurice Naftalin
4.6 out of 5 stars (23)  $23.09
Explore similar items


Editorial Reviews

Product Description

Raves for the First Edition!

 

“I sure wish I had this book ten years ago. Some might think that I don’t need any Java books, but I need this one.”

–James Gosling, fellow and vice president, Sun Microsystems, Inc.

 

“An excellent book, crammed with good advice on using the Java programming language and object-oriented programming in general.”

–Gilad Bracha, coauthor of The Java™ Language Specification, Third Edition

 

“10/10–anyone aspiring to write good Java code that others will appreciate reading and maintaining should be required to own a copy of this book. This is one of those rare books where the information won’t become obsolete with subsequent releases of the JDK library.”
–Peter Tran, bartender, JavaRanch.com

 

“The best Java book yet written.... Really great; very readable and eminently useful. I can’t say enough good things about this book. At JavaOne 2001, James Gosling said, ‘Go buy this book!’ I’m glad I did, and I couldn’t agree more.”
–Keith Edwards, senior member of research staff, Computer Science Lab at the Palo Alto Research Center (PARC), and author of Core JINI (Prentice Hall, 2000)

 

“This is a truly excellent book done by the guy who designed several of the better recent Java platform APIs (including the Collections API).”
–James Clark, technical lead of the XML Working Group during the creation of the XML 1.0 Recommendation, editor of the XPath and XSLT Recommendations

 

“Great content. Analogous to Scott Meyers’ classic Effective C++. If you know the basics of Java, this has to be your next book.”
–Gary K. Evans, OO mentor and consultant, Evanetics, Inc

 

“Josh Bloch gives great insight into best practices that really can only be discovered after years of study and experience.”
–Mark Mascolino, software engineer

 

“This is a superb book. It clearly covers many of the language/platform subtleties and trickery you need to learn to become a real Java master.”
–Victor Wiewiorowski, vice president development and code quality manager, ValueCommerce Co., Tokyo, Japan

 

“I like books that under-promise in their titles and over-deliver in their contents. This book has 57 items of programming advice that are well chosen. Each item reveals a clear, deep grasp of the language. Each one illustrates in simple, practical terms the limits of programming on intuition alone, or taking the most direct path to a solution without fully understanding what the language offers.”

–Michael Ernest, Inkling Research, Inc.

 

“I don’t find many programming books that make me want to read every page–this is one of them.”
–Matt Tucker, chief technical officer, Jive Software

 

“Great how-to resource for the experienced developer.”
–John Zukowski, author of numerous Java technology books

 

“I picked this book up two weeks ago and can safely say I learned more about the Java language in three days of reading than I did in three months of study! An excellent book and a welcome addition to my Java library.”
–Jane Griscti, I/T advisory specialist

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.



About the Author

Joshua Bloch is chief Java architect at Google and a Jolt Award winner. He was previously a distinguished engineer at Sun Microsystems and a senior systems designer at Transarc. Bloch led the design and implementation of numerous Java platform features, including JDK 5.0 language enhancements and the award-winning Java Collections Framework. He coauthored Java™ Puzzlers (Addison-Wesley, 2005) and Java™ Concurrency in Practice (Addison-Wesley, 2006).



See all Editorial Reviews

Product Details


Inside This Book (learn more)

What Do Customers Ultimately Buy After Viewing This Item?


Tags Customers Associate with This Product

 (What's this?)
Click on a tag to find related items, discussions, and people.
Check the boxes next to the tags you consider relevant or enter your own tags in the field below.
(36)

Your tags: Add your first tag
 
Help others find this product — tag it for Amazon search
No one has tagged this product for Amazon search yet. Why not be the first to suggest a search for which it should appear?

 

Customer Reviews

35 Reviews
5 star:
 (33)
4 star:
 (2)
3 star:    (0)
2 star:    (0)
1 star:    (0)
 
 
 
 
 
Average Customer Review
4.9 out of 5 stars (35 customer reviews)
 
 
 
 
Share your thoughts with other customers:
Most Helpful Customer Reviews

 
35 of 35 people found the following review helpful:
5.0 out of 5 stars A powerful update to an already-classic title, May 16, 2008
Please see my review of the first edition for my general response. My opinion hasn't changed with the second, so I'll focus on what's new in this review.

The second edition was well worth the wait. The number of items are beefed up to 78 from 57. The chapter "Substitutes for C Constructs" is gone, but replaced by more contemporary material on "Generics" and "Enums and Annotations." Some first edition items have been amended to address features new to Java since the first edition was released. Some new items also address concurrency, favoring it over traditional Java threads. As expected, the cases for each item are methodically and persuaisvely made. If you are particularly interested in concurrency, also consider Java Concurrency in Practice.

The item discussions use boldface liberally to highlight key points, sometimes calling attention to arguments in the first edition that have been updated. If you're skimming -- the author in fact doesn't encourage cover-to-cover reading -- these highlights are useful attractors to important material you might otherwise gloss.

It's often helpful to have practices or insights you've earned on your own backed up by a reputable authority. Effective Java certainly helps with that. More importantly, the arguments that support his items are clear, easy to read, and compelling. Anyone proficient with Java would have to go a long way to find fault with them. In fact, it took considerable investigation to determine that one item from the first edition -- "Provide a readResolve method when necessary" -- was not the best advice for some cases. Bloch addresses that issue head-on in this edition, and provides its replacement ("For instance control, prefer enum types to readResolve").

As with the first edition, this one is a necessity for any serious Java developer.
Comment Comment | Permalink | Was this review helpful to you? Yes No (Report this)



 
11 of 11 people found the following review helpful:
5.0 out of 5 stars Simply a great book!, June 30, 2008
By Gunnar Hillert (Atlanta, GA USA) - See all my reviews
(REAL NAME)   
Effective Java, Second Edition by Joshua Bloch is certainly the best Java book I have read in a long time. As a disclaimer, I never read the first edition and I am thus unable to compare the two editions. Effective Java, Second Edition is a mostly easy and fun read providing you with many insights and best practices on how to use Java effectively. It certainly is not a book for the beginner just starting out learning Java. For that purpose you may want to take a look at Thinking in Java by Bruce Eckel instead. Nevertheless, Effective Java would serve as an excellent follow-up.

In Effective Java, Joshua Bloch does a great job describing best practices that you as developer will find useful on a daily basis. For example, I really found his description of the builder pattern (Item 2, page 11) quite interesting. Another Item that fascinated me, was Item 15 (page 73) - "Minimize mutability". Both items are part of a broader theme throughout the book that promotes creating code that is as immutable as possible. In that regard, reading the book will enable you to simply write better and safer code. The book also leads the way towards promoting functional programming techniques which will come in quite handily when developing multithreaded applications. Therefore, as a next book I may recommend reading Java Concurrency in Practice by Brian Goetz.

Even for the experienced Java developer, Effective Java contains quite a few little eye openers. I for example was previously unaware of how static factory methods can simplify the creation of parameterized type instances using "type inference". This is described on page 9 (Item 1). In the past I had always used something like this:

List<User> users = new ArrayList<User>();

But by using a static factory method you can do:

List<User> users = Helper.newArrayList();

I thought that this was a pretty nifty example that may help making code a bit cleaner. What I also very much liked about Effective Java was that Joshua points out certain short-comings of the Java language itself and its APIs whenever applicable. For example, page 64 describes the inconsistent behavior between BigDecimal's 'equals' method and its 'compareTo' method, and in item 41 (page 194) Joshua details the shortcomings of the List interface when using Autoboxing.

While the vast majority of the book was very easy to read and to understand, I found that the chapter about bounded wildcards using generics (item 28) was a little difficult to grasp and I wished it were a bit more extensive. On the other side, the provided mnemonic is quite helpful: PECS - Producer-extends, Consumer-super.

Overall, I highly recommend Effective Java, Second Edition which will continue to serve me, and likely you too, as an excellent reference resource.
Comment Comment | Permalink | Was this review helpful to you? Yes No (Report this)



 
15 of 17 people found the following review helpful:
5.0 out of 5 stars A must read book, May 21, 2008
If you are not too busy at work it probably worth stop writing code till you finish reading this book.
Seriously.

BTW Don't be tempted to save and buy a cheaper first edition.
The second edition has some very important changes and new information.
Comment Comment | Permalink | Was this review helpful to you? Yes No (Report this)


Share your thoughts with other customers: Create your own review
 
 
 
Most Recent Customer Reviews

5.0 out of 5 stars Howsome
Every Java developer who is concerned by the design and performaces of their application should have this book.
it really is the Java Holy Bible
Published 17 days ago by M. Thomas Boquet

5.0 out of 5 stars Fantastic book if you're an experienced C# and want to do the switch!
I was an experienced C# programmer wanting to do the switch over to Java. The "Hello World" java books were a waste of time. Read more
Published 19 days ago by Carlos A. Arguelles

5.0 out of 5 stars Everything you probably never thought about
I must admit, I already considered myself a Java expert before reading this book - if it hadn't come so highly recommended, I probably never would have picked it up. Read more
Published 21 days ago by Joshua Davies

5.0 out of 5 stars If you are a Java programmer, this book is a must have!
If you are a Java programmer and you want a guide to writing high quality code, this book is a must! Read more
Published 2 months ago by Shunichi Kanade

5.0 out of 5 stars Must have for every Serious Java Developer
I purchased this book last week from Amazon.com and already I am hooked to it.The style is not pedantic but thorough. Read more
Published 2 months ago by Shridhar Upadhyaya

5.0 out of 5 stars Impresionante
El libro de mayor nivel que he leído hasta la fecha, con el que se pueden aprender cosas que sólo una experiencia de décadas al más alto nivel de programación y diseño puede... Read more
Published 2 months ago by Carlos H.

5.0 out of 5 stars Great Book,
Used this book while taking a computer science course. This is flat out, the best java book period. Dont waste your time or money with anything else.
Published 3 months ago by A. Chin

5.0 out of 5 stars Very good book
I actually read the 1st edition of this book and really liked. Somehow somebody took my hardcopy of this book and never returned back. Read more
Published 3 months ago by Olexiy Prokhorenko

5.0 out of 5 stars If you are a Java Programmer you should read this book
This books has a lot of very useful tips. It'll give you a good and practical understanding of some basic Java language concepts (like inner classes, generics, etc). Read more
Published 4 months ago by R. A. Diaz

5.0 out of 5 stars A student's perspective: New insights on every page
I am thoroughly enjoying this book and learning a lot in the process. The author is responsible for many of the successful APIs in the Java language, such as the Collections... Read more
Published 4 months ago by Nicholas Dunn

Only search this product's reviews



Customer Discussions

 Beta (What's this?)
New! See all customer communities, and bookmark your communities to keep track of them.
This product's forum (0 discussions)
  Discussion Replies Latest Post
  No discussions yet

Ask questions, Share opinions, Gain insight
Start a new discussion
Topic:
First post:
Prompts for sign-in
  [Cancel]


Active discussions in related forums
   


Product Information from the Amapedia Community

Beta (What's this?)



Look for Similar Items by Category


Work and Roll with DEWALT

DEWALT Job Site Radio
While supplies last, enjoy special pricing on the DEWALT work site radio. Power it and you'll be rockin' and chargin' your way through a hard day of work.

Shop more chargers and radios

 

Big Savings in Books

Bargain Books
Find great titles at fantastic prices in our Bargain Books Store.
 

Dive into Summer Reading

Summer Reading for Kids and Teens
Don't even think about hitting the beach without browsing the books in our Summer Reading Store. Discover bestsellers, paperback picks, beach reads, and more terrific titles all summer long.
 

Generate Power

Shop for Portable Generators
When temporary or remote electric power is required, a portable generator provides the electricity you need.

Shop for portable generators

 

 

Feedback

If you need help or have a question for Customer Service, contact us.
 Would you like to update product info or give feedback on images?
Is there any other feedback you would like to provide?

Your comments can help make our site better for everyone.


Where's My Stuff?

Shipping & Returns

Need Help?

Your Recent History

  (What's this?)
You have no recently viewed items or searches.

After viewing product detail pages or search results, look here to find an easy way to navigate back to pages you are interested in.

Look to the right column to find helpful suggestions for your shopping session.

Continue shopping: Top Sellers
Paranoia
Paranoia by Joseph Finder
My Soul to Lose
My Soul to Lose by Rachel Vincent
Glenn Beck's Common Sense
Glenn Beck's Common Sense

Conditions of Use | Privacy Notice © 1996-2009, Amazon.com, Inc. or its affiliates