Join Amazon Prime and ship Two-Day for free and Overnight for $3.99. Already a member? Sign in.
Effective Java Programming Language Guide and over 300,000 other books are available for Amazon Kindle – Amazon’s new wireless reading device. Learn more

 

or
Sign in to turn on 1-Click ordering.
 
 
More Buying Choices
90 used & new from $3.96

Have one to sell? Sell yours here
 
   
Effective Java: Programming Language Guide (Java Series)
 
 
Start reading Effective Java Programming Language Guide on your Kindle in under a minute.

Don’t have a Kindle? Get yours here.
 
  

Effective Java: Programming Language Guide (Java Series) (Paperback)

by Joshua Bloch (Author)
4.8 out of 5 stars See all reviews (122 customer reviews)

List Price: $54.99
Price: $44.84 & this item ships for FREE with Super Saver Shipping. Details
You Save: $10.15 (18%)
In Stock.
Ships from and sold by Amazon.com. Gift-wrap available.

Only 3 left in stock--order soon (more on the way).

38 new from $4.95 52 used from $3.96
Also Available in: List Price: Our Price: Other Offers:
Kindle Edition (Kindle Book) $39.99
There is a newer edition of this item:
Effective Java (2nd Edition) (Java Series) Effective Java (2nd Edition) (Java Series) 4.9 out of 5 stars (35)
$44.43
In Stock.
What Do Customers Ultimately Buy After Viewing This Item?
Effective Java (2nd Edition) (Java Series)
43% buy
Effective Java (2nd Edition) (Java Series) 4.9 out of 5 stars (35)
$44.43
Effective Java: Programming Language Guide (Java Series)
36% buy the item featured on this page:
Effective Java: Programming Language Guide (Java Series) 4.8 out of 5 stars (122)
$44.84
Head First Java, 2nd Edition
9% buy
Head First Java, 2nd Edition 4.4 out of 5 stars (240)
$29.67
Java Concurrency in Practice
7% buy
Java Concurrency in Practice 4.8 out of 5 stars (59)
$37.79

Frequently Bought Together

Effective Java: Programming Language Guide (Java Series) + Java Concurrency in Practice + Effective Java (2nd Edition) (Java Series)
  • This item: Effective Java: Programming Language Guide (Java Series) by Joshua Bloch

    In Stock.
    Ships from and sold by Amazon.com.
    This item ships for FREE with Super Saver Shipping. Details

  • Java Concurrency in Practice by Brian Goetz

    In Stock.
    Ships from and sold by Amazon.com.
    This item ships for FREE with Super Saver Shipping. Details

  • Effective Java (2nd Edition) (Java Series) by Joshua Bloch

    In Stock.
    Ships from and sold by Amazon.com.
    This item ships for FREE with Super Saver Shipping. Details


Customers Who Bought This Item Also Bought

Java(TM) Puzzlers: Traps, Pitfalls, and Corner Cases

Java(TM) Puzzlers: Traps, Pitfalls, and Corner Cases

by Joshua Bloch
4.5 out of 5 stars (30)  $35.99
Creating Components: Object Oriented, Concurrent, and Distributed Computing in Java

Creating Components: Object Oriented, Concurrent, and Distributed Computing in Java

by Charles W. Kann
4.0 out of 5 stars (2)  $74.07
Thinking in Java (4th Edition)

Thinking in Java (4th Edition)

by Bruce Eckel
4.2 out of 5 stars (300)  $43.86
Program Development in Java: Abstraction, Specification, and Object-Oriented Design

Program Development in Java: Abstraction, Specification, and Object-Oriented Design

by Barbara Liskov
3.9 out of 5 stars (10)  $54.39
Java Generics and Collections

Java Generics and Collections

by Maurice Naftalin
4.6 out of 5 stars (23)  $23.09
Explore similar items

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)


Product Description
(Pearson Education) Working solutions to programming challenges faced by Java developers on a daily basis, revealing what to do to produce clear, robust and efficient code. Include rules in short essay form, and the author's 'war stories,' giving advice and insights into nuances of the language. Softcover.

See all Editorial Reviews

Product Details

  • Paperback: 272 pages
  • Publisher: Addison-Wesley (June 15, 2001)
  • Language: English
  • ISBN-10: 0201310058
  • ISBN-13: 978-0201310054
  • Product Dimensions: 9.1 x 7.3 x 0.6 inches
  • Shipping Weight: 1.2 pounds (View shipping rates and policies)
  • Average Customer Review: 4.8 out of 5 stars See all reviews (122 customer reviews)
  • Amazon.com Sales Rank: #30,080 in Books (See Bestsellers in Books)

    Popular in these categories: (What's this?)

    #44 in  Books > Computers & Internet > Programming > Java
    #52 in  Books > Nonfiction > Foreign Language Nonfiction > French

Look Inside This Book


Tags Customers Associate with This Product

 (What's this?)
Click on a tag to find related items, discussions, and people.
Check the boxes next to the tags you consider relevant or enter your own tags in the field below.
(34)

Your tags: Add your first tag
 
Help others find this product — tag it for Amazon search
No one has tagged this product for Amazon search yet. Why not be the first to suggest a search for which it should appear?

 

Customer Reviews

122 Reviews
5 star:
 (110)
4 star:
 (6)
3 star:
 (4)
2 star:
 (2)
1 star:    (0)
 
 
 
 
 
Average Customer Review
4.8 out of 5 stars (122 customer reviews)
 
 
 
 
Share your thoughts with other customers:
Most Helpful Customer Reviews

 
180 of 183 people found the following review helpful:
5.0 out of 5 stars This is what you need to know to become a Java guru!, September 5, 2001
By Doug Bell "Java guru" (San Diego, CA USA) - See all my reviews
(REAL NAME)   
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.

The other caveat is that this book is written from the perspective of writing public APIs. Bloch is the lead architect for the core JDK APIs where the classes and APIs have special security considerations. Several pieces of advice he gives apply absolutely to a public API where you want to defend the API from malicious code. However, if the code you are creating is intended for a less hostile and more trusting environment, fully following all of his advice will result in unnecessarily complex code. The one knock I give to the book is that Bloch does not delineate the circumstances that would dictate following his rather rigorous approach to bullet-proofing an API and can leave the reader with the mistaken perception that the advice applies equally to all categories of code.

Overall, this is absolutely a must-have book for the experienced Java programmer. Even if you are not yet an advanced Java programmer, buy this book and keep revisiting it as you advance until everything in the book makes sense to you.

Comment Comments (2) | Permalink | Was this review helpful to you? Yes No (Report this)



 
27 of 27 people found the following review helpful:
5.0 out of 5 stars The best book on how to program in Java, July 25, 2001
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 Comment | Permalink | Was this review helpful to you? Yes No (Report this)



 
22 of 22 people found the following review helpful:
5.0 out of 5 stars Brilliant, succinct and highly professional, May 2, 2002
By Goldin Evgeny (Tel-Aviv, Israel) - See all my reviews
(REAL NAME)   
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() ?)

Amazingly - this book contains tons of essential information but Joshua's
succinct style simple put it into 230 pages and 57 items. I don't think there's
any sentence or chapter you may ignore - every word author says worths remembering
very good and very carefully. I read it once but I'm definitely going to re-read
it once in a while.

If you need other proofs - just believe me that most of the Java articles on
JavaWorld and JDC reference this book in that or another way. If James Gosling is
saying "Some might think that I don't need any Java books, but I need this one",
doesn't it mean that you and me definitely need it too ?
I wish I could give it 6 starts, really.

Happy reading !

Comment Comment | Permalink | Was this review helpful to you? Yes No (Report this)


Share your thoughts with other customers: Create your own review
 
 
 
Most Recent Customer Reviews

5.0 out of 5 stars This Book is a Daily Guide for the Java Developer
I purchased this book last week from Amazon.com and already I am hooked to it.The style is not pedantic but thorough. Read more
Published 2 months ago by Shridhar Upadhyaya

4.0 out of 5 stars Good but a little outdated.
Good book, but a little outdated.
Surely it's a must if you program in Java (but the same applies to all the books on improving programming languages), it is not enough to... Read more
Published 5 months ago by Fuga Federico

5.0 out of 5 stars Great Guide
I am only about half way through this book and already have learned numerous things about the design of Java as a language and about proper usage of said language. Read more
Published 15 months ago by Justin Hughey

5.0 out of 5 stars Indispensable...
An indispensable, insightful, and well written Java book to add to your reference library. The second addition is due out May 25, 2008.
Published 15 months ago by M. ROGERS

5.0 out of 5 stars Great recommendations
I ask all of the developers I manage to read this book, after having been introduced to it by a coworker. Read more
Published 16 months ago by Ben Twain

5.0 out of 5 stars Thing of Beauty is Joy Forever ...
It is incredible to read Joshua's insights. Forget about being a Java Guru or something like that. This book is pure joy to read if you are detail oriented, perfectionist or a... Read more
Published 21 months ago by Kedar Mhaswade

5.0 out of 5 stars Best Java book available
I've been using Java since 1995 and have owned this book since 2001 and it's the only Java text I still turn to. Read more
Published 21 months ago by C. Longo

5.0 out of 5 stars Effective reading
This is the best technical book I have ever read.
It explains the pros and cons of many Java-dependent programming approaches. Read more
Published 21 months ago by Joaquín Carré Seras

5.0 out of 5 stars Excellent book but nice to have an update
Very well written book. I learned a lot from this book. I thought I know Java a lot thru my experience on them but realized I am missing a lot after reading this book. Read more
Published on May 28, 2007 by E. Bagsik

5.0 out of 5 stars Something for programmers at every level
That's the good news. The bad news is: needs to be updated for Java 1.5 (or even 1.6). There an entire section, for example, on how to simulate Enum, which is now part of the... Read more
Published on May 19, 2007 by Andrew J. Lazarus

Only search this product's reviews



Customer Discussions

 Beta (What's this?)
New! See all customer communities, and bookmark your communities to keep track of them.
This product's forum (3 discussions)
  Discussion Replies Latest Post
Will it ever be released? 9 June 2008
vs headfirst 2 November 2007
Welcome to the Effective Java Programming forum 0 November 2005
See all 3 discussions...  
Start a new discussion
Topic:
First post:
Prompts for sign-in
  [Cancel]


Active discussions in related forums
  Discussion Replies Latest Post
Textbooks for Kindle DX? 34 22 hours ago
C# or Java? 32 5 days ago
Does anyone use Discovering Geometry: An Investigative Approach? 3 13 days ago
   


Product Information from the Amapedia Community

Beta (What's this?)



Look for Similar Items by Category


Up to 30% Off Lansinoh

Up to 30% Off Lansinoh
This July, enjoy savings of up to 30% on select Lansinoh products offered by Amazon.com. Lansinoh is dedicated to providing breastfeeding solutions.

Learn more

 

Best Books of 2008

Best of 2008
Find our top 100 editors' picks as well as customers' favorites in dozens of categories in our Best Books of 2008 Store.
 

Rake In the Leaves

Shop for Rakes
There are as many types of rakes as there are landscapes. Browse through a wide selection of rakes in the Home Improvement Store.
 

Craftsman Tools and Yard Equipment

Shop for Craftsman Tools
Craftsman, America's most-trusted tool brand, combines rugged durability, reliable performance, and inspired design in its quality products for the home.

Shop now

 

 

Feedback

If you need help or have a question for Customer Service, contact us.
 Would you like to update product info or give feedback on images?
Is there any other feedback you would like to provide?

Your comments can help make our site better for everyone.


Where's My Stuff?

Shipping & Returns

Need Help?

Your Recent History

  (What's this?)
You have no recently viewed items or searches.

After viewing product detail pages or search results, look here to find an easy way to navigate back to pages you are interested in.

Look to the right column to find helpful suggestions for your shopping session.

Continue shopping: Top Sellers

Conditions of Use | Privacy Notice © 1996-2009, Amazon.com, Inc. or its affiliates