Effective Java and over 360,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
61 used & new from $24.99

Have one to sell? Sell yours here
 
   
Express Checkout with PayPhrase
What's this? | Create PayPhrase
Sorry!
Effective Java (2nd Edition)
 
 
Start reading Effective Java on your Kindle in under a minute.

Don’t have a Kindle? Get your Kindle here.
 
  

Effective Java (2nd Edition) (Paperback)

~ (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 (36 customer reviews)

List Price: $54.99
Price: $33.03 & this item ships for FREE with Super Saver Shipping. Details
You Save: $21.96 (40%)
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, November 10? Choose One-Day Shipping at checkout. Details
44 new from $27.45 17 used from $24.99

Formats

Amazon Price New from Used from
  Kindle Edition $26.42 -- --
  Paperback $33.03 $27.45 $24.99

Frequently Bought Together

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

Show availability and shipping details

  • This item: Effective Java (2nd Edition) by Joshua Bloch

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

  • Java Concurrency in Practice by Brian Goetz

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

  • Java(TM) Puzzlers: Traps, Pitfalls, and Corner Cases by Joshua Bloch

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


Special Offers and Product Promotions


Customers Who Bought This Item Also Bought

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)  $36.75
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.79
Java Generics and Collections

Java Generics and Collections

by Maurice Naftalin
4.6 out of 5 stars (23)  $23.09
Core Java(TM), Volume I--Fundamentals (8th Edition)

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

by Cay S. Horstmann
4.3 out of 5 stars (18)  $37.79
Spring Recipes: A Problem-Solution Approach (Books for Professionals by Professionals)

Spring Recipes: A Problem-Solution Approach (Books for Professionals by Professionals)

by Gary Mak
4.8 out of 5 stars (24)  $33.64
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).


Product Details

  • Paperback: 384 pages
  • Publisher: Prentice Hall PTR; 2 edition (May 28, 2008)
  • Language: English
  • ISBN-10: 0321356683
  • ISBN-13: 978-0321356680
  • Product Dimensions: 8.8 x 7.5 x 0.9 inches
  • Shipping Weight: 1.6 pounds (View shipping rates and policies)
  • Average Customer Review: 4.9 out of 5 stars  See all reviews (36 customer reviews)
  • Amazon.com Sales Rank: #2,873 in Books (See Bestsellers in Books)

    Popular in these categories: (What's this?)

    #2 in  Books > Computers & Internet > Programming > Java
    #5 in  Books > Computers & Internet > Programming > Software Design, Testing & Engineering > Object-Oriented Design
    #8 in  Books > Computers & Internet > Programming > Languages & Tools

More About the Author

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

Visit Amazon's Joshua Bloch Page

Inside This Book (learn more)

What Do Customers Ultimately Buy After Viewing This Item?

Effective Java (2nd Edition)
84% buy the item featured on this page:
Effective Java (2nd Edition) 4.9 out of 5 stars (36)
$33.03
Head First Java, 2nd Edition
8% buy
Head First Java, 2nd Edition 4.4 out of 5 stars (250)
$29.67
Core Java(TM), Volume I--Fundamentals (8th Edition)
3% buy
Core Java(TM), Volume I--Fundamentals (8th Edition) 4.3 out of 5 stars (18)
$37.79
Java Concurrency in Practice
3% buy
Java Concurrency in Practice 4.8 out of 5 stars (60)
$37.79

Tags Customers Associate with This Product

 (What's this?)
Click on a tag to find related items, discussions, and people.
 
(40)

Your tags: Add your first tag
 

 

Customer Reviews

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

 
37 of 37 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)



 
13 of 13 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)



 
16 of 18 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 Awesome Reference for my Java Library
This book is loaded with best practices for the seasoned Java programmer. Every Java developer should keep this book in their book bag. Read more
Published 1 month ago by J. Maines

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 4 months 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 4 months 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 4 months 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 5 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 6 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 6 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 7 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 7 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 7 months ago by R. A. Diaz

Only search this product's reviews



Customer Discussions

This product's forum
Discussion Replies Latest Post
No discussions yet

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


Active discussions in related forums
Discussion Replies Latest Post
Textbooks for Kindle DX? 61 1 day ago
textbook scam 66 5 days ago
Amazon is a great place to buy textbooks! 35 17 days ago
Search Customer Discussions
Search all Amazon discussions
   




Product Information from the Amapedia Community

Beta (What's this?)


Look for Similar Items by Category


Look for Similar Items by Subject

 

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.


Your Recent History

 (What's this?)

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