Enter your mobile number 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.
Getting the download link through email is temporarily not available. Please check back later.

  • Apple
  • Android
  • Windows Phone
  • Android

To get the free app, enter your mobile phone number.

Effective Java: Programming Language Guide (Java Series)

4.8 out of 5 stars 127 customer reviews
ISBN-13: 078-5342310054
ISBN-10: 0201310058
Why is ISBN important?
This bar-code number lets you verify that you're getting exactly the right version or edition of a book. The 13-digit and 10-digit formats both work.
Scan an ISBN with your phone
Use the Amazon App to scan ISBNs and compare prices.
Have one to sell? Sell on Amazon
Buy used
Condition: Used - Good
Condition: Used: Good
Comment: The item shows wear from consistent use, but it remains in good condition and works perfectly. It may be marked, have identifying markings on it, or show other signs of previous use.
Access codes and supplements are not guaranteed with used items.
70 Used from $0.01
FREE Shipping on orders over $25.
More Buying Choices
21 New from $5.04 70 Used from $0.01 2 Collectible from $24.95

There is a newer edition of this item:

Free Two-Day Shipping for College Students with Prime Student Free%20Two-Day%20Shipping%20for%20College%20Students%20with%20Amazon%20Student

Windows 10 For Dummies Video Training
Get up to speed with Windows 10 with this video training course from For Dummies. Learn more.
click to open popover

Editorial Reviews

Amazon.com Review

Written for the working Java developer, Joshua Bloch's Effective Java Programming Language Guide provides a truly useful set of over 50 best practices and tips for writing better Java code. With plenty of advice from an indisputable expert in the field, this title is sure to be an indispensable resource for anyone who wants to get more out of their code.

As a veteran developer at Sun, the author shares his considerable insight into the design choices made over the years in Sun's own Java libraries (which the author acknowledges haven't always been perfect). Based on his experience working with Sun's best minds, the author provides a compilation of 57 tips for better Java code organized by category. Many of these ideas will let you write more robust classes that better cooperate with built-in Java APIs. Many of the tips make use of software patterns and demonstrate an up-to-the-minute sense of what works best in today's design. Each tip is clearly introduced and explained with code snippets used to demonstrate each programming principle.

Early sections on creating and destroying objects show you ways to make better use of resources, including how to avoid duplicate objects. Next comes an absolutely indispensable guide to implementing "required" methods for custom classes. This material will help you write new classes that cooperate with old ones (with advice on implementing essential requirements like the equals() and hashCode() methods).

The author has a lot to say about class design, whether using inheritance or composition. Tips on designing methods show you how to create understandable, maintainable, and robust classes that can be easily reused by others on your team. Sections on mapping C code (like structures, unions, and enumerated types) onto Java will help C programmers bring their existing skills to Sun's new language. Later sections delve into some general programming tips, like using exceptions effectively. The book closes with advice on using threads and synchronization techniques, plus some worthwhile advice on object serialization.

Whatever your level of Java knowledge, this title can make you a more effective programmer. Wisely written, yet never pompous or doctrinaire, the author has succeeded in packaging some really valuable nuggets of advice into a concise and very accessible guidebook that arguably deserves a place on most any developer's bookshelf. --Richard Dragan

Topics covered:

  • Best practices and tips for Java
  • Creating and destroying objects (static factory methods, singletons, avoiding duplicate objects and finalizers)
  • Required methods for custom classes (overriding equals(), hashCode(), toString(), clone(), and compareTo() properly)
  • Hints for class and interface design (minimizing class and member accessibility, immutability, composition versus inheritance, interfaces versus abstract classes, preventing subclassing, static versus nonstatic classes)
  • C constructs in Java (structures, unions, enumerated types, and function pointers in Java)
  • Tips for designing methods (parameter validation, defensive copies, method signatures, method overloading, zero-length arrays, hints for Javadoc comments)
  • General programming advice (local variable scope, using Java API libraries, avoiding float and double for exact comparisons, when to avoid strings, string concatenation, interfaces and reflection, avoid native methods, optimizing hints, naming conventions)
  • Programming with exceptions (checked versus run-time exceptions, standard exceptions, documenting exceptions, failure-capture information, failure atomicity)
  • Threading and multitasking (synchronization and scheduling hints, thread safety, avoiding thread groups)
  • Serialization (when to implement Serializable, the readObject(), and readResolve() methods)

From the Back Cover

"An excellent book, crammed with good advice on using the Java™ programming language and object-oriented programming in general."

--Gilad Bracha, Computational Theologist, Sun Microsystems, Inc., and co-author of The Java™ Language Specification, Second 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., and inventor of the Java™ programming language

Are you looking for a concise book packed with insight and wisdom not found elsewhere? Need to really understand the Java programming language; that is, really understand it? Do you want to write code that is clear, correct, robust, and reusable? Look no further! The book you are holding will provide you with this and many other benefits you may not even know you were looking for. Become a more effective programmer.

Featuring fifty-seven valuable rules of thumb, Effective Java™ Programming Language Guide contains working solutions to the programming challenges most developers encounter every day. Offering comprehensive descriptions of techniques used by the experts who developed the Java platform, the book reveals what to do--and what not to do--in order to produce clear, robust, and efficient code.

Each rule appears in the form of a short, stand-alone essay offering insight, code examples, and "war stories" from this uniquely qualified author. The essays include specific advice and insights into the subtleties of the language and are illustrated with exceptional code examples. Throughout the book, common language idioms and design patterns are examined and insightful and enlightening tips and techniques are provided.

Coverage includes:

  • Customary and effective language usage that is saturated with expert advice in a concise, readable, and easy-to-access format.
  • Patterns, antipatterns, and idioms to help you get the most out of the Java platform.
  • Commonly misunderstood subtleties of the language and its libraries: how to avoid the traps and pitfalls.
  • Focus on the language and its most fundamental libraries: java.lang, java.util, and, to a lesser extent, java.io.
  • Detailed coverage of serialization, including practical advice that is not available elsewhere.

    Appealing to a broad spectrum of the programming community, Effective Java™ Programming Language Guide presents the most practical, authoritative guidelines available for writing efficient, well-designed programs for the Java platform.


    New York Times best sellers
    Browse the New York Times best sellers in popular categories like Fiction, Nonfiction, Picture Books and more. See more

    Product Details

    • Paperback: 272 pages
    • Publisher: Addison-Wesley (June 15, 2001)
    • Language: English
    • ISBN-10: 0201310058
    • ISBN-13: 978-0201310054
    • Product Dimensions: 7.2 x 0.7 x 9.1 inches
    • Shipping Weight: 1.2 pounds
    • Average Customer Review: 4.8 out of 5 stars  See all reviews (127 customer reviews)
    • Amazon Best Sellers Rank: #476,672 in Books (See Top 100 in Books)

    Customer Reviews

    Top Customer Reviews

    By Doug Bell on September 5, 2001
    Format: Paperback Verified Purchase
    This book contains a generous cross-section of the knowledge that differentiates Java gurus from advanced Java programmers.
    I've been working full-time in Java since 1995, prior to version 1.0. I've also written books and articles on Java and have been teaching Java at the University level as a sideline for four years. In that time I've accumulated a great deal of "expert" knowledge about the language, the JVM, and the APIs and developed opinions on the best approaches to use in Java. At this point, reading books such as this that contain a collection of tips and advice I am usually satisfied to gain one new piece of knowledge; I learned at least six new things from this book.
    Of the 50+ books on Java I've read, this book contains by far the most comprehensive and useful collection of that hard-won knowledge of core Java. The bonus is the clear and concise manner in which it is presented.
    Bloch is dead-on. There isn't a single factual error or piece of bad advice in the book. The most I came up with were a couple of omissions on some of the topics. However, omissions are inevitable given the technical depth of some of the topics Bloch covers, such as serialization, exceptions and threads.
    I offer only two caveats about the book. The first is that the book is for advanced Java programmers. This is not to say that this information is not useful to every Java programmer, but you need to have a comprehensive knowledge of Java in order to appreciate many of the topics. This book does not provide comprehensive coverage, but rather fills in the detail and subtleties. I teach a Java IV class and recommend this to my students as additional reading after completing the class.
    Read more ›
    2 Comments 196 people found this helpful. Was this review helpful to you? Yes No Sending feedback...
    Thank you for your feedback.
    Sorry, we failed to record your vote. Please try again
    Report abuse
    Format: Paperback
    I spend a lot of time thinking and talking about programming, languages, style, etc. This book is without question the best thing I've read about how to program in Java.
    The book contains 57 suggestions on what to do or not to do when writing Java code. Most are common sense, though not all -- the material on serialization was new to me, for example. But it's common sense that's developed over time, and much of it is not obvious until you have a lot of experience using the language. Even then, it's worth reading; I consider myself a fairly experienced Java programmer, and I'd say that a quarter of the book was new material for me. Even when I knew a technique he was recommending, it was really good to read the arguments Bloch made for doing something in a particular way. And I found that I agree with almost everything he wrote.
    The book is very Java-specific. Some of the tips generalize to other, similar, object-oriented languages, or to systems with similar thread models, but, by and large, this is nitty gritty Java hacking. I like that: it allows Block to be concrete in what he says. And, unlike most of the stuff written by JavaSoft employees, this book does not try to pretend that Java is flawless, which is a refreshing perspective; see, for example, his discussion of the Cloneable interface.
    What's best about the book is that it encodes a lot of the lore and feel of the language: how to use it in practice.
    If you're working in Java, it belongs on your shelf next to the language specification, and those are the only two general books on the language you should need.
    Comment 31 people found this helpful. Was this review helpful to you? Yes No Sending feedback...
    Thank you for your feedback.
    Sorry, we failed to record your vote. Please try again
    Report abuse
    Format: Paperback
    IMHO, The Java Bible is out. It is that simple. I think this book deserves no
    less popularity and respect than "Effective C++" which set the high standard
    to the "Effective" series.
    It's definitely not a beginners book, this is the book that core Java developers
    should memorize by heart. This book is written by the Sun expert who both
    design and develop Java run-time libraries (Collections, in particular, which is
    one of the prettiest species in Java) and is definitely aware of their successes
    and failures. Out of his experience Joshua brings hundreds of "how about this"
    unexpectable situations - those I doubt you was ever thinking of before.
    It contains 57 issues covering topics about:
    - creating objects (how about static factories vs constructors ?)
    - methods common to all objects (ever thought that overriding clone, equals, hashCode
    and toString is easy ?),
    - designing interfaces of your classes and interfaces (ever realized how immutability
    is important ? ever wondered which one of the inner classes fits best ?)
    - substitutes to C constructs (don't say there are no unions and enums in Java)
    - general programming and methods (ever knew that overloading is dangerous in
    it's nature and that ( 1.00 - ( 9 * 0.1 )) != 0.1 ?)
    - exceptions (ever wondered how should you react to some particular failure -
    terminate the JVM, throw the exception [which one ?], return null ?)
    - threads (ever thought that double check locking is broken and that notify() is
    more dangerous than notifyAll() anh what are 'alien' methods that cause deadlocks ?)
    - serialization (making your object serializable should never be just declaring
    it this way ! How about readResolve() and defensive readObject() ?
    Read more ›
    Comment 23 people found this helpful. Was this review helpful to you? Yes No Sending feedback...
    Thank you for your feedback.
    Sorry, we failed to record your vote. Please try again
    Report abuse

    Most Recent Customer Reviews

    Pages with Related Products. See and discover other items: java programming