Start reading Effective Java (2nd Edition) (Java Series) on your Kindle in under a minute. Don't have a Kindle? Get your Kindle here.
Programming Books C Java PHP Python Learn more Browse Programming Books

Deliver to your Kindle or other device

Enter a promotion code
or gift card
 
 
 

Try it free

Sample the beginning of this book for free

Deliver to your Kindle or other device

Anybody can read Kindle books—even without a Kindle device—with the FREE Kindle app for smartphones, tablets and computers.
Sorry, this item is not available in
Image not available for
Color:
Image not available

To view this video download Flash Player

 

Effective Java (2nd Edition) (Java Series) [Kindle Edition]

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

Digital List Price: $43.99 What's this?
Print List Price: $54.99
Kindle Price: $25.49
You Save: $29.50 (54%)

Formats

Amazon Price New from Used from
Kindle Edition $25.49  
Paperback $36.57  
Unknown Binding --  
Shop the New Digital Design Bookstore
Check out the Digital Design Bookstore, a new hub for photographers, art directors, illustrators, web developers, and other creative individuals to find highly rated and highly relevant career resources. Shop books on web development and graphic design, or check out blog posts by authors and thought-leaders in the design industry. Shop now

Book Description

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.



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

  • File Size: 1318 KB
  • Print Length: 374 pages
  • Page Numbers Source ISBN: 0321356683
  • Simultaneous Device Usage: Up to 5 simultaneous devices, per publisher limits
  • Publisher: Addison-Wesley Professional; 2 edition (May 8, 2008)
  • Sold by: Amazon Digital Services, Inc.
  • Language: English
  • ASIN: B000WJOUPA
  • Text-to-Speech: Enabled
  • X-Ray:
  • Lending: Not Enabled
  • Amazon Best Sellers Rank: #20,073 Paid in Kindle Store (See Top 100 Paid in Kindle Store)
  •  Would you like to give feedback on images?


Customer Reviews

Most Helpful Customer Reviews
86 of 88 people found the following review helpful
5.0 out of 5 stars A powerful update to an already-classic title May 16, 2008
Format: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.
Was this review helpful to you?
56 of 60 people found the following review helpful
5.0 out of 5 stars Simply a great book! June 30, 2008
Format: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).
Read more ›
Comment | 
Was this review helpful to you?
81 of 91 people found the following review helpful
4.0 out of 5 stars Good, but not all items are equal May 12, 2010
Format: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.
Read more ›
Was this review helpful to you?
Most Recent Customer Reviews
5.0 out of 5 stars excellent coverage of the concepts in the Java language and how to...
I reread this book periodically so I do not forget some of the topics so ably covered with great examples
Published 9 days ago by D. Milotte
5.0 out of 5 stars Nice book...
Good things to learn, I say a must have for every JAVA programmer. It is easy to understand but not for most beginners.
Published 1 month ago by Rafael Negron
5.0 out of 5 stars A "must have" for anyone progaramming professionally in Java.
A good reference for experienced programmers coming to Java from C++ or another language. It's not another "learn to program in Java" book, but rather a collection of... Read more
Published 1 month ago by calphoto
5.0 out of 5 stars Just scanning the sections will elevate your game
The issues brought up will make you a more savvy programmer. The examples are clear and support the premise of each tip.
Published 2 months ago by Nestor Fernandez
5.0 out of 5 stars very good
I think this is probably the best book on Java I have ever read. It's well written, fun and precise.
Published 2 months ago by Tomislav Stojanovic
5.0 out of 5 stars a must read for java professionals
If you make money coding with java, this book is going to help you to do it better. Enjoy it
Published 2 months ago by Leo
5.0 out of 5 stars Great book
Very clear and informative! I was recommended by a friend and would definitely recommend it to anyone else! Hope to see the next edition in the future
Published 2 months ago by Vitali Melamud
5.0 out of 5 stars ... This is that book that I wish I pulled the trigger on and began...
I haven't finished the book yet, I'm just on item 40 right now; but even just the first 10 items are worth the purchase of this book. Read more
Published 3 months ago by th3byrdm4n
5.0 out of 5 stars A must have for any java developer
I can saw I have a much better understanding of java because of this book. Much needed for any intro developer to take his or her coding to the next level.
Published 3 months ago by J. Domagalski
5.0 out of 5 stars yourJavaLevel++
This book is one of the highest rated Java books in existence. The main reason that I chose to read this book is because one of my colleagues highly recommended it. Read more
Published 3 months ago by Marcos Savoury
Search Customer Reviews
Only search this product's reviews

More About the Author

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

What Other Items Do Customers Buy After Viewing This Item?



Forums

Search Customer Discussions
Search all Amazon discussions

Topic From this Discussion
Are Developper books usable on Kindle
From what I've herd, not really. An iPad/ DX would probably be better, but you're best bet would be a good, old-fashion, paper-bound. It's hard to do the reference necessary when you can't flip through pages quickly.
Jun 2, 2011 by Savetheearth77 |  See all 2 posts
3rd edition? Be the first to reply
Start a new discussion
Topic:
First post:
Prompts for sign-in
 




Look for Similar Items by Category


ARRAY(0xa6ecd8ac)