Effective Java (2nd Edition) 2nd Edition
Use the Amazon App to scan ISBNs and compare prices.
"Devoted" by Dean Koontz
For the first time in paperback, from Dean Koontz, the master of suspense, comes an epic thriller about a terrifying killer and the singular compassion it will take to defeat him. | Learn more
Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.
To get the free app, enter your mobile phone number.
Frequently bought together
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
From the Back Cover
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.
- New coverage of generics, enums, annotations, autoboxing, the for-each loop, varargs, concurrency utilities, and much moreUpdated techniques and best practices on classic topics, including objects, classes, libraries, methods, and serializationHow to avoid the traps and pitfalls of commonly misunderstood subtleties of the languageFocus 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(tm), Second Edition,presents the most practical, authoritative guidelines available for writing efficient, well-designed programs.
- Item Weight : 1.43 pounds
- Paperback : 346 pages
- ISBN-10 : 0321356683
- ISBN-13 : 978-0321356680
- Product Dimensions : 8.5 x 0.83 x 11 inches
- Publisher : Addison-Wesley; 2nd Edition (May 28, 2008)
- Language: : English
- Best Sellers Rank: #202,188 in Books (See Top 100 in Books)
- Customer Reviews:
Top reviews from the United States
There was a problem filtering reviews right now. Please try again later.
I liked that the author made definitive statements about which style is best, and explains why. For example Item 16, "Favor composition over inheritance" describes how inheritance can violate encapsulation and why it leads to fragile software. First we are shown an example using inheritance that is broken, a way to rewrite it using composition, and followed by a concluding explanation.
The author highlights key points in bold text; this was a helpful way to see the critical points being made. Many statements are well sourced as the References section in the back contains upwards of 40 books.
I read some other reviews of this book which said they thought the author was too authoritative with his opinion. I actually found this to be the strong suit of the book, in that the author states his design preference, why it is best, shows examples, and the sources his information. He knows the material and the language very well. I have yet to read a better Java design book so far.
If you are concerned about receiving the "fake" version after reading reviews. I want to let you know that I recently ordered this book and I did not receive the "fake" version.
I am still a student but I can relate to some of the things he talks about, and see where I have deviated from his suggestions in the past. The author is clear to point out why these things are problems in terms of either code reuse, extensibility, type safety, or some other aspect, so even though it wasn't necessarily an issue in the context of a school project, in the real world it certainly might be.
The author borrows the format from Scott Meyer's Effective C++ series of books, and it works very well in this context. While the chapters are logically organized, they are set up in such a way that you do not need to read from start to finish; you can jump around and read the interesting bits at will, and often items in one section of the book refer to later (or earlier) items.
Finally, I appreciate that the book explains some of the less well known or understood features of recent versions of Java. For instance, I had never heard of the annotation feature added, but he goes on to show a great example of how you can use annotations to build a simple test framework for a class.
Even if you are not yet a software professional, you owe it to yourself to get a jump start by reading this book.
This is not a basic / novice level book - but assumes that the reader has already used Java for a number of years.
It is best to read this book slowly absorbing the thoughts / concepts and what the author is conveying. Some of the things could be subtle but - if they are tried out - after reading each article it makes more sense.
The author had written a lot of the core Java libraries while at SUN - and you can see his name in the source files in the JDK. The author has complete clear and crisp understanding of the concepts and lucidly explains the points - with clear small and right examples.
I used to read this book - 1 article a day and then try out the concepts conveyed in the article.
I had read the 1st edition of the book long time back - and it clearly - imprinted in my mind - why hash() function needs to be written and the deficiencies of a bad hash function.
This new edition includes all the new features of the language as incorporated in Java 1.5 other than the concurrency related classes.
Only deficiency of the book, I do wish - it had some more articles about the Concurrency related libraries that were introduced in Java 1.5.
Anyone who would like to know more about the internals of Java - should purchase this book and read it
Top reviews from other countries
Subject matter - Covers Java & OOP best practice in a number of 'items' (nearly 80) and organised loosely into chapters. It's not about how to program with Java, but about writing Java whilst applying industry best practice.
Price - usual high price for a software book.
Conclusion - I'm glad I bought it. I'm still studying my way through, there are so many golden nuggets in this book that I know this will become a reference book for me. Highly recommended if you care about the Java that you write or need to maintain.
Unfortunately the low cost is down to Amazon supplying a print-on-demand version which is larger and less convenient to carry around and use than the original. The front cover is also poor quality making it look like a counterfeit copy from a dodgy market.
If this matters to you go for the e-book version or spend a bit more and buy from a real bookshop.
Definitely a must read for a new Java developer or someone who needs to hone their skills/knowledge.