My Favorite Java Books

My standard book questions

When I think about textbooks and other books, I usually ask myself some questions:

Would this be a book I would buy if I wanted to learn the subject on my own?

Can the book later be used as a reference?

What do the Amazon reviews say?

If it was used in a course, should I keep or throw it out?

Language

The following books aren't going to give the absolute beginner
a simple enough start, but if you already know about
variables, ifs and loops,
or know another programming language and want to
learn Java, these are good books.

Head First Java by Kathy Sierra and Bert Bates, O'Reilly

At first glance it looks like a book for dummies, but it isn't.
It's funny and entertaining, has lots of diagrams, and is also a great Java book
written by two smart Java people who helped to develop the Java
Certification exam. This is a book which gives you the big picture.
Amazon price $30 (a bargain)

Core Java volumes I+II by Cay Horstmann and Gary Cornell,

If you already know some Java or are a C++ programming converting
to Java, this is a really good book, or set of books. Currently at the
seventh edition, I've purchased at least three of the earlier editions.
Amazon price: $31 for the first volume, $62 for both. Get the first
and, if you like it, get the second. Useful both to learn from and
later as a reference.

Java: How to Program by Deitel and Deitel, Pearson Prentice-Hall

I have mixed feelings about this, but it's better than most.
It's crammed with tons of information
about Java, and it is a good resource in many ways.
However, the authors sometimes get obsessed with small features and
completely lose sight of the big picture. This is also starting to
show its age and hasn't been updated as well as it should have been.
Amazon price $88 (seems a bit expensive).

Design

Object-Oriented Design & Patterns by Cay Horstmann

This is a good, brief, book that covers everything from Java's
OO language features, with a healthy bit of OO design, and many
of the common design patterns.
This second edition incorporates Java 5 features.

It passes all the tests. Even the one bad review in Amazon was mostly
just disagreement about terminology (eg, the first chapter should have been called
a brief review, not a crash course; javadoc should have been a described as a
implementation tool more than a design tool). I'm not sure about the
negative multi-threading comment.

Favorite Java books from JavaLobby poll

I've extracted many of the books from this list, and kept those that I like
too, or added warnings to others that might be a problem. I've also put them
in categories.

Java language/usage

Java : How to Program (6th Edition) by Deitel and Deitel
Quite good if you don't get lost in the details.

Head First Java (2nd Edition) By Kathy Sierra and Bert Bates.
Probably the best book for understanding basic concepts, but it
doesn't cover as much of the language as others. Excellent.

Java Examples In A Nutshell (3rd Edition) by David Flanagan.
I wish it was updated to Java 5.

Java Cookbook (2nd Edition) By Ian Darwin.
Lots of good examples with discussions.

Java In A Nutshell (5th Edition) by David Flanagan.
I definitely like the first part of this book. The bulk
of the remainder is something you can get from the javadoc, but still nice
to have on paper.

GUI Bloopers: Don'ts and Do's for Software Developers and Web Designers by Jeff Johnson.
If you're going to build a Graphical User Interface, you should have
some idea about how to make it look "right". There is no Java code here,
but a lot of good examples of good and bad GUI design.

Programmers Guide to Java Certification by Khalid Mughal and Rolf Rasmussen.
The earlier version I have was good. Much
better than some of the certification books.

Thinking in Java (4th Edition) by Bruce Eckel.
If you're interested in delving into the details of everthing,
this is a book for you, but probably not the right book to start your
Java learning with tho. The first seven chapters are available for
free online now, and maybe the rest will follow.

Java Puzzlers
By Joshua Bloch; Neal Gafter. I've just glanced at it, and did learn a few things.
Perhaps I should take another look.

Effective Java Programming Language Guide
By Joshua Bloch. Good, but I think it's overrated. I read a lot of it
in a bookstore, but didn't think it was worth buying.

General Programming Wisdom

Code Complete (2nd Edition)
By Steve McConnell

The Pragmatic Programmer: From Journeyman to Master
By Andrew Hunt; David Thomas

Domain-Driven Design: Tackling Complexity in the Heart of Software
By Eric Evans

Java Design Patterns: A Tutorial
By James W. Cooper

Facts and Fallacies of Software Engineering
By Robert L. Glass

Software Engineering

Agile Software Development: Principles, Patterns, and Practices
By Robert C. Martin.
[Also similar books by Alistair Cockburn, Craig Larman, and Jim Highsmith,
as well as on specific methodologies such as Extreme Programming and SCRUM.]