Effective Java, 2/e (Paperback)

Joshua Bloch



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.



-James Gosling,Sun Microsystems公司的研究員和副總裁

-Gilad Bracha,《Java語言規範第三版》的合著者

-Peter Tran,JavaRanch.com的調酒師

「這是迄今為止最好的Java書籍...真的很棒,非常易讀且非常實用。對於這本書,我無法說出足夠的好話。在2001年的JavaOne大會上,James Gosling說:『去買這本書!』我很高興我買了,而且我完全同意他的觀點。」
-Keith Edwards,Palo Alto研究中心(PARC)的資深研究員,以及《Core JINI》(Prentice Hall,2000年)的作者

「這是一本由設計了幾個最近優秀的Java平台API(包括Collections API)的人所撰寫的真正優秀的書籍。」
-James Clark,XML 1.0建議書的XML工作小組技術負責人,XPath和XSLT建議書的編輯者

「內容很棒。類似於Scott Meyers的經典作品《Effective C++》。如果你已經掌握了Java的基礎知識,這本書應該是你的下一本書。」
-Gary K. Evans,Evanetics公司的OO導師和顧問

「Josh Bloch提供了對最佳實踐的深入洞察,這些洞察只有在多年的學習和經驗中才能發現。」
-Mark Mascolino,軟體工程師

-Victor Wiewiorowski,ValueCommerce Co.的副總裁開發和程式碼品質經理,東京,日本

-Michael Ernest,Inkling Research公司

-Matt Tucker,Jive Software的首席技術官

-John Zukowski,數字的作者