Here are some books that at some point I've found useful for Java programming.
- Java in a Nutshell, 5th Edition, by David Flanagan (O'Reilly).
- A very handy reference that is indispensible to anyone seriously involved in Java
- Thinking in Java, by Bruce Eckel (Prentice Hall)
- Good treatment of object-oriented programming in the context of Java. Pretty dense in parts, but very good.
- Core Java, Volumes I and II, by Cay S. Horstmann and Gary Cornell.
- Written as something between a reference and a textbook. Covers technical details more thoroughly than other books.
- Design Patterns, by Erich Gamma et al.
- A classic book on design philosophies in object-oriented programming. Written with C++ in mind, but works just as well for application to Java