Effective Java (2nd Edition) and over one million other books are available for Amazon Kindle. Learn more

Buy New

or
Sign in to turn on 1-Click ordering.
or
Amazon Prime Free Trial required. Sign up when you check out. Learn More
Buy Used
Used - Good See details
$33.79 & this item ships for FREE with Super Saver Shipping. Details

or
Sign in to turn on 1-Click ordering.
 
   
Kindle Edition
 
   
Sell Back Your Copy
For a $19.81 Gift Card
Trade in
More Buying Choices
Have one to sell? Sell yours here
Effective Java (2nd Edition)
 
 
Start reading Effective Java (2nd Edition) on your Kindle in under a minute.

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.

Effective Java (2nd Edition) [Paperback]

Joshua Bloch (Author)
4.8 out of 5 stars  See all reviews (73 customer reviews)

List Price: $54.99
Price: $39.75 & this item ships for FREE with Super Saver Shipping. Details
You Save: $15.24 (28%)
o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o
In Stock.
Ships from and sold by Amazon.com. Gift-wrap available.
Want it delivered Tuesday, February 14? Choose One-Day Shipping at checkout. Details
Textbook Student FREE Two-Day Shipping for students on millions of items. Learn more

Formats

Amazon Price New from Used from
Kindle Edition $15.92  
Paperback $39.75  
Unknown Binding --  
Sell Back Your Copy for $19.81
Whether you buy it used on Amazon for $29.85 or somewhere else, you can sell it back through our Book Trade-In Program at the current price of $19.81.
Used Price$29.85
Trade-in Price$19.81
Price after
Trade-in
$10.04

Book Description

May 28, 2008 0321356683 978-0321356680 2

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.


Best Value

Buy Java Performance and get Effective Java (2nd Edition) at an additional 5% off Amazon.com's everyday low price.

Java Performance + Effective Java (2nd Edition)
Buy Together Today: $80.05

Show availability and shipping details

  • Java Performance

    In Stock.
    Ships from and sold by Amazon.com.
    This item ships for FREE with Super Saver Shipping. Details

  • This item: Effective Java (2nd Edition)

    In Stock.
    Ships from and sold by Amazon.com.
    This item ships for FREE with Super Saver Shipping. Details



Editorial Reviews

Review

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

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).


Product Details

  • Paperback: 346 pages
  • Publisher: Addison-Wesley; 2 edition (May 28, 2008)
  • Language: English
  • ISBN-10: 0321356683
  • ISBN-13: 978-0321356680
  • Product Dimensions: 7.3 x 1 x 9.2 inches
  • Shipping Weight: 1.7 pounds (View shipping rates and policies)
  • Average Customer Review: 4.8 out of 5 stars  See all reviews (73 customer reviews)
  • Amazon Best Sellers Rank: #3,291 in Books (See Top 100 in Books)

More About the Author

Discover books, learn about writers, read author blogs, and more.

 

Customer Reviews

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

62 of 63 people found the following review helpful:
5.0 out of 5 stars A powerful update to an already-classic title, May 16, 2008
This review is from: Effective Java (2nd Edition) (Paperback)
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.
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


40 of 42 people found the following review helpful:
5.0 out of 5 stars Simply a great book!, June 30, 2008
By 
This review is from: Effective Java (2nd Edition) (Paperback)
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.
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


35 of 38 people found the following review helpful:
4.0 out of 5 stars Good, but not all items are equal, May 12, 2010
This review is from: Effective Java (2nd Edition) (Paperback)
If you want to know the good things about this book, read the other reviews, many of which I agree with. This review just states what makes the book 4 stars for me instead of 5, because none of the other reviews I read pointed them out.

Most of the items in book are very good, a few are great and well worth the price of the book and the time it takes to read it, but some have to be taken with a grain of salt. They probably make sense if you come from the background of working on the Java API team, as the author does, but wouldn't make much sense on any of the projects I have worked on. The problem is that all are presented as universal truths and only through experience can you tell which truly are and which can be ignored.

I also feel that some of the items need to be tempered with just plain practical usefulness. I know that programming a certain way makes the code bullet proof from certain errors by not compiling if those errors are introduced, but if the code is quite a bit harder to understand and those errors are rare, is it really worth it? Also, some of the items are written as if everything you are writing is being published and supported publicly. If code and interfaces are just being used between two teams within the company, or even just on a single team, some of the logic used to describe why items are important don't make as much sense. Again, I just feel that these are something that make complete sense if you are writing on the API team, but not necessarily in every other case.

My final small complaint is that the author tends to be a bit wordy on some of the items, fully explaining out every nuance of the wrong way to do it, which tends to create noise in some explanations that are pretty heavy anyway.

Overall, I would recommend the book, it has already made my programming better. An additional note is that I did not find any errors in the code examples or even the formatting, something that I find rare in programming books.
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No

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











Only search this product's reviews



Inside This Book (learn more)
Key Phrases - Statistically Improbable Phrases (SIPs): (learn more)
executor framework, collections framework, default serialized form, custom serialized form, serialization proxy pattern, explicit termination method, defensive copying, use enums instead, bounded wildcard type, reference return result, boxed primitives, int servings, int calories, many constructor parameters, nonstatic member class, defensive copies, enum pattern, unchecked cast, wildcard types, service provider framework, varargs methods, enclosing instance, static factory methods, int fat, skeletal implementation
Key Phrases - Capitalized Phrases (CAPs): (learn more)
Null Poi, Wed Apr, Standard Edition, Unknown Collection, Hound Dog, Heartbreak Hotel, Java Concurrency, Lazy Initialization
Browse Sample Pages:
Front Cover | Table of Contents | First Pages | Index | Surprise Me!
Search Inside This Book:

What Other Items Do Customers 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.
 
(59)

Your tags: Add your first tag
 

Customer Discussions

This product's forum
Discussion Replies Latest Post
Are Developper books usable on Kindle 1 Jun 2, 2011
See all discussions...  
Start a new discussion
Topic:
First post:
Prompts for sign-in
 


Active discussions in related forums
Search Customer Discussions
   
Related forums


Listmania!




Look for Similar Items by Category


Look for Similar Items by Subject