Effective Java (2nd Edition) 2nd Edition
| Joshua Bloch (Author) Find all the books, read about the author, and more. See search results for this author |
Use the Amazon App to scan ISBNs and compare prices.
- FREE return shipping at the end of the semester.
- Access codes and supplements are not guaranteed with rentals.
Fulfillment by Amazon (FBA) is a service we offer sellers that lets them store their products in Amazon's fulfillment centers, and we directly pack, ship, and provide customer service for these products. Something we hope you'll especially enjoy: FBA items qualify for FREE Shipping and .
If you're a seller, Fulfillment by Amazon can help you grow your business. Learn more about the program.
- List Price: $35.47
- Save:$19.94(56%)
Frequently bought together
Customers who viewed this item also viewed
Editorial Reviews
Review
--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
Video Game Review by 1UP.com
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).
Excerpt. © Reprinted by permission. All rights reserved.
Preface to the Second Edition
A lot has happened to the Java platform since I wrote the first edition of this book in 2001, and it’s high time for a second edition. The most significant set of changes was the addition of generics, enum types, annotations, autoboxing, and the for-each loop in Java 5. A close second was the addition of the new concurrency library, java.util.concurrent, also released in Java 5. With Gilad Bracha, I had the good fortune to lead the teams that designed the new language features. I also had the good fortune to serve on the team that designed and developed the concurrency library, which was led by Doug Lea.
The other big change in the platform is the widespread adoption of modern Integrated Development Environments (IDEs), such as Eclipse, IntelliJ IDEA, and NetBeans, and of static analysis tools, such as FindBugs. While I have not been involved in these efforts, I’ve benefited from them immensely and learned how they affect the Java development experience.
In 2004, I moved from Sun to Google, but I’ve continued my involvement in the development of the Java platform over the past four years, contributing to the concurrency and collections APIs through the good offices of Google and the Java Community Process. I’ve also had the pleasure of using the Java platform to develop libraries for use within Google. Now I know what it feels like to be a user.
As was the case in 2001 when I wrote the first edition, my primary goal is to share my experience with you so that you can imitate my successes while avoiding my failures. The new material continues to make liberal use of real-world examples from the Java platform libraries.
The first edition succeeded beyond my wildest expectations, and I’ve done my best to stay true to its spirit while covering all of the new material that was required to bring the book up to date. It was inevitable that the book would grow, and grow it did, from fifty-seven items to seventy-eight. Not only did I add twenty-three items, but I thoroughly revised all the original material and retired a few items whose better days had passed. In the Appendix, you can see how the material in this edition relates to the material in the first edition.
In the Preface to the First Edition, I wrote that the Java programming language and its libraries were immensely conducive to quality and productivity, and a joy to work with. The changes in releases 5 and 6 have taken a good thing and made it better. The platform is much bigger now than it was in 2001 and more complex, but once you learn the patterns and idioms for using the new features, they make your programs better and your life easier. I hope this edition captures my continued enthusiasm for the platform and helps make your use of the platform and its new features more effective and enjoyable.
San Jose, California
April 2008
Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.
Product details
- Publisher : Addison-Wesley; 2nd edition (May 28, 2008)
- Language : English
- Paperback : 346 pages
- ISBN-10 : 0321356683
- ISBN-13 : 978-0321356680
- Item Weight : 1.43 pounds
- Dimensions : 8.5 x 0.83 x 11 inches
- Best Sellers Rank: #724,682 in Books (See Top 100 in Books)
- #75 in Beginner's Guides to Java Programming
- #189 in Object-Oriented Software Design
- #503 in Object-Oriented Design
- Customer Reviews:
About the author

Joshua J. Bloch (born August 28, 1961) is a software engineer and a technology author, formerly employed at Sun Microsystems and Google. He led the design and implementation of numerous Java platform features, including the Java Collections Framework, the java.math package, and the assert mechanism. He is the author of the programming guide Effective Java (2001), which won the 2001 Jolt Award, and is a co-author of two other Java books, Java Puzzlers (2005) and Java Concurrency In Practice (2006).
Bloch holds a B.S. in computer science from Columbia University and a Ph.D. in computer science from Carnegie Mellon University. His 1990 thesis was titled A Practical Approach to Replication of Abstract Data Objects and was nominated for the ACM Distinguished Doctoral Dissertation Award.
Bloch has worked as a Senior Systems Designer at Transarc, and later as a Distinguished Engineer at Sun Microsystems. In June 2004 he left Sun and became Chief Java Architect at Google. On August 3, 2012, Bloch announced that he would be leaving Google.
In December 2004, Java Developer's Journal included Bloch in its list of the "Top 40 Software People in the World".
Bloch has proposed the extension of the Java programming language with two features: Concise Instance Creation Expressions (CICE) (coproposed with Bob Lee and Doug Lea) and Automatic Resource Management (ARM) blocks. The combination of CICE and ARM formed one of the three early proposals for adding support for closures to Java. ARM blocks were added to the language in JDK7.
Bloch is currently a faculty member of the Institute for Software Research at Carnegie Mellon University, where he holds the title "Professor of the Practice". In addition to his research, Bloch teaches coursework in Software Engineering.
Bio from Wikipedia, the free encyclopedia.
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.









