167

Which Java book do you think is the must-have one for all Java developers?

Keep in mind:

  • One book per answer
  • Check for duplicates before adding new answers
279 accepted

Effective Java, Second Edition by Joshua Bloch. No question.

If every Java developer read this book, there would be a lot less broken code in the world.

After that, I'd read Java Concurrency in Practice (see separate answer), and maybe Java Generics and Collections (see separate answer). Anyone that reads and puts into practice the information in these three books has come a long way toward mastering Java.


Comments from duplicate "Effective Java" answers:

"I sure wish I had 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.

sammyo: It's a thin(!!) volume that focuses on real issues and how to think about the right approach to java problems. (as opposed to a listing of API methods)

Hans Doggen: First edition of Effective Java and then the second edition, to see some of the ideas that changed over time.

71

Thinking in Java by Bruce Eckel


Comments from duplicate answers:

prash: Thinking in Java by Bruce Eckel is a great book for beginners and teaches you not only the "What"s and "How"s of Java but also the "Why"s. It is available from the above link.

Michael Easter: It is an introduction and yet discusses the background behind Generics, Swing, elementary threading, and a large metaphor for Java NIO. It is a massive work that covers the range from beginner to expert. There are other books that are better for experts but would be wasted on novices.

57

Head First Design Patterns - not necessarily a pure Java book, but essential for every Java developers who designs his applications himself.

56

Java Puzzlers is another great one by Joshua Bloch (with Neal Gafter).

http://www.javapuzzlers.com/lg-puzzlers-cropped.jpg

The entire content of the book is just small Java applications that are quirky enough that they don't necessarily behave how you might immediately think.

56

When it comes to multithreading, Java Concurrency in Practice is the choice.

48

Head First Java is great for beginners.

Effective Java will take you from journeyman to master.

38

Refactoring by Martin Fowler

Especially the chapter about Bad Smells in Code should be understood by everyone.

24

Java Programming Language is a good way to learn Java. I would highly recommend it.

21

Core Java Vol 1 and Vol 2 by Cay S. Horstmann.

Hard to read but very informative and without excess words. These books cover every aspect in Java SE. But this book will be a little hard for beginners IMO.

15

O'Reilly's Java in a Nutshell is a good book for both tutorials and reference.

12

Java Generics and Collections by Maurice Naftalin & Philip Wadler. Philip Wadler is one of Java generics grandfather. Java is close enough to C++ that it wasn't a big deal at all for me to switch over, that was until I started using Generics. This book is a gold mine of info.

12

Java Language Specification (also freely available online) is great if you want to get deeper into the semantics of Java language.

alt text

(Links and comments above merged from a duplicate answer by folone.)

9

Better, Faster, Lighter Java

By Bruce A. Tate, Justin Gehtland

Its a really good one.

8

Filthy Rich Clients, by Chet Haase and Romain Guy. Those guys are Swing ninjas.

8

If you want to understand, how it all works, The Java Virtual Machine Specification (also freely available online) is the book for you.

8

Data Structures and Algorithms in Java by Robert Lafore. Nice book.

alt text

7
  1. 1000 Java Tips Alexandre Patchine, Dr. Heinz M. Kabutz | Published in 2005, 856 pages

  2. A Java GUI Programmer's Primer Fintan Culwin, Dintan Culwin | Prentice Hall Published in 1998, 322 pages

  3. Advanced Programming for the Java 2 Platform Calvin Austin, Monica Pawlan | Addison Wesley Longman Published in 2000, 400 pages

  4. Apache Jakarta Commons: Reusable Java Components Will Iverson | Prentice Hall PTR Published in 2005, 360 pages

  5. Beyond Java Bruce Tate | O'Reilly Media, Inc. Published in 2005, 200 pages

  6. Bleeding at the Keyboard: A Guide to Modern Programming with Java Gregory J. E. Rawlins | Published in 1999

  7. Brewing Java: A Tutorial Elliotte Rusty Harold | Cafe au Lait Published in 2005

  8. Concurrent Programming Using Java Stephen J. Hartley | Published in 2005

  9. Core Servlets and Javaserver Pages Marty Hall, Larry Brown | Prentice Hall PTR Published in 2003, 736 pages

  10. Data Structures and Algorithms with Object-Oriented Design Patterns in Java Bruno R. Preiss | Wiley Published in 1999, 656 pages

  11. Designing Enterprise Applications with the J2EE Platform Inderjeet Singh, at al. | Prentice Hall PTR Published in 2002, 448 pages

  12. Designing Web Services with the J2EE 1.4 Platform Inderjeet Singh, at al. | Prentice Hall PTR Published in 2004, 464 pages

  13. Developing with Eclipse and Maven by Tim O'Brien, at al. | Sonatype, Inc. Published in 2009, 74 pages

  14. EJB Design Patterns: Advanced Patterns, Processes, and Idioms Floyd Marinescu | Wiley Published in 2002, 288 pages

  15. Essentials of the Java Programming Language: A Hands-On Guide 1 - 2 Monica Pawlan | Addison-Wesley Professional Published in 2000, 301 pages

  16. Evaluating Java for Game Development Jacob Marner | Published in 2002, 314 pages

  17. Finite-state Automata in Java Bradley Kjell | Cental Connecticut State University Published in 2001

  18. From Java to Sumatra Leendert van Gastel, Andr? Heck | Amstel Institute Published in 1997

  19. Getting Started with the Java 3D API Dennis J. Bouvier | Sun Microsystems, Inc. Published in 1999

  20. How to Think Like a Computer Scientist (Java Version) Allen B. Downey | Green Tea Press Published in 2008, 306 pages

  21. HTTP Programming Recipes for Java Bots Jeff Heaton | Heaton Research, Inc. Published in 2007, 680 pages

  22. Interactive Programming In Java Lynn Andrea Stein | Morgan Kaufmann Publishers Published in 2003, 545 pages

  23. Introduction to Computer Science using Java Bradley Kjell | Central Connecticut State University Published in 2006

  24. Introduction to Java and OOA/OOD for Web Applications Alvin J. Alexander | DevDaily.com Published in 2002

  25. Introduction to Neural Networks for Java Jeff Heaton | Heaton Research, Inc. Published in 2008, 440 pages

  26. Introduction to Programming Using Java, Fifth Edition David J. Eck | Published in 2006, 690 pages

  27. Jakarta Struts Live Richard Hightower | SourceBeat Published in 2004, 273 pages

  28. Java - Servlets - JSP V. Mukhi, S. Mukhi, N. Kotecha | bpbonline.com

  29. Java Application Development on Linux Carl Albing, Michael Schwarz | Prentice Hall PTR Published in 2004, 600 pages

  30. Java Au Naturel Dr. William C. Jones, Jr. | Published in 2004

  31. Java Authentication and Authorization Service (JAAS) in Action Michael Cote | Published in 2005

  32. Java AWT Reference John Zukowski | O'Reilly Published in 1997, 1074 pages

  33. Java for the Beginning Programmer Jeff Heaton | Heaton Research, Inc. Published in 2006, 336 pages

  34. Java in a Nutshell David Flanagan | O'Reilly Published in 1997, 628 pages

  35. Java Language Reference Mark Grand | O'Reilly Published in 1997, 492 pages

  36. Java Look and Feel Design Guidelines, 2nd Edition Sun Microsystems Inc. | Addison-Wesley Professional Published in 2001, 416 pages

  37. Java Look and Feel Design Guidelines: Advanced Topics | Addison-Wesley Professional Published in 2001, 200 pages

  38. Java Native Interface: Programmer's Guide and Specification Sheng Liang | Prentice Hall PTR Published in 1999, 320 pages

  39. Java Precisely Peter Sestoft | IT University of Copenhagen Published in 2000, 68 pages

  40. Java Sound Programmer Guide | Sun Microsystems, Inc. Published in 2002

  41. Java Speech API Programmer's Guide | Sun Microsystems, Inc. Published in 1998

  42. Java Structures: Data Structures in Java for the Principled Programmer Duane A. Bailey | McGraw-Hill Published in 2007, 542 pages

  43. Java Testing and Design Frank Cohen | Prentice Hall PTR Published in 2004, 544 pages

  44. Java(TM) Platform Performance: Strategies and Tactics Steve Wilson, Jeff Kesselman | Prentice Hall PTR Published in 2000, 256 pages

  45. Java: An Object First Approach Fintan Culwin | Prentice Hall Published in 1997, 393 pages

  46. Java: Classes in Java Applications David Etheridge | BookBoon Published in 2009, 118 pages

  47. Java: Graphical User Interfaces David Etheridge | BookBoon Published in 2009, 101 pages

  48. Java: The Fundamentals of Objects and Classes David Etheridge | BookBoon Published in 2009, 92 pages

  49. JSF Jumpstart John Ferguson Smart | Wakaleo Consulting Ltd Published in 2007, 67 pages

  50. JXTA Brendon J. Wilson | New Riders Publishing Published in 2002, 350 pages

  51. Killer Game Programming in Java Andrew Davison | O'Reilly Media Published in 2009

  52. Learn Internet Game Programming with Java | Soft Lookup Corp. Published in 2004

  53. Mastering Enterprise JavaBeans 3.0 R. P. Sriganesh, G. Brose, M. Silverman | Wiley Published in 2007, 685 pages

  54. Mathematical Computation Ian Craw | University of Aberdeen Published in 2003, 156 pages

  55. Maven by Example Tim O'Brien, at al. | Sonatype, Inc. Published in 2010

  56. Maven Handbook Tim O'Brien, Stuart McCulloch | Sonatype, Inc. Published in 2009, 100 pages

  57. Maven: The Definitive Guide Sonatype Company | O'Reilly Media, Inc. Published in 2008, 468 pages

  58. More Servlets and JavaServer Pages Marty Hall | Pearson Education Published in 2001, 752 pages

  59. Object-Oriented Programming Using Java David J. Eck, Anban Pillay | Published in 2007, 221 pages

  60. Practical Artificial Intelligence Programming in Java Mark Watson | Lulu.com Published in 2008, 222 pages

  61. Processing XML with Java Elliotte Rusty Harold | Addison-Wesley Professional Published in 2002, 1120 pages

  62. Programming in Java Advanced Imaging | Sun Microsystems, Inc. Published in 1999

  63. Programming Principles in Java: Architectures and Interfaces David Schmidt | Kansas State University Published in 2003, 748 pages

  64. QuickTime for Java: A Developer's Notebook Chris Adamson | O'Reilly Media, Inc. Published in 2005, 255 pages

  65. Repository Management with Nexus Tim O'Brien, at al. | Sonatype, Inc. Published in 2009, 226 pages

  66. Sams Teach Yourself Java 2 in 24 Hours Rogers Cadenhead, Mark Taber | Sams Published in 1999, 429 pages

  67. Securing Java: Getting Down to Business with Mobile Code Gary McGraw, Edward W. Felten | Wiley Published in 1999, 324 pages

  68. Servlets and JavaServer Pages: The J2EE Technology Web Tier Jayson Falkner, Kevin Jones | Addison-Wesley Published in 2003, 784 pages

  69. Sun Certified Java Programmer Pre-Exam Essentials Dylan Walsh | Published in 2002

  70. Swing, 2nd Edition Matthew Robinson, Pavel Vorobiev | Manning Publications Published in 2003, 912 pages

  71. The Design Patterns Java Companion James W. Cooper | Published in 1998, 218 pages

  72. The J2EE 1.4 Tutorial Eric Armstrong, at al. | Sun Microsystems, Inc. Published in 2006, 1542 pages

  73. The J2EE Architect's Handbook Derek C. Ashmore | DVT Press Published in 2004, 288 pages

  74. The Java Game Development Tutorial Fabian Birzele | Java Cooperation Published in 2004

  75. The Java Language Specification, 3rd edition James Gosling, Bill Joy, Guy Steele, Gilad Bracha | Prentice Hall PTR Published in 2005, 684 pages

  76. The Java Virtual Machine Specification, 2nd Edition Tim Lindholm, Frank Yellin | Prentice Hall PTR Published in 1999, 496 pages

  77. The Java Web Services Tutorial Eric Armstrong, et al | Pearson Education Published in 2005, 457 pages

  78. Thinking in Enterprise Java Bruce Eckel et. al. | MindView, Inc. Published in 2003

  79. Thinking in Java, 3rd Edition Bruce Eckel | Prentice Hall PTR Published in 2002, 1119 pages

5

Learning Java has really helped me get up-to-speed.

And Hardcore Java is an incredible follow-on for intermediate Java developers.

5

Concurrent Programming in Java: Design Principles and Patterns by Doug Lea (2nd edition)

Concurrent Programming in Java

http://java.sun.com/docs/books/cp/

4

Agile Java: Crafting Code with Test-Driven Development is what got me started on Test-Driven Development. It helped me a lot both learning TDD and Java at the same time.

4

Currently Reading through "Spring in Action" and so far it has a course set for one of my top java books.

4

Everyone should read Effective Java once.
Thinking in Java is a good intro for transitioning programmers.

The best Java book I've read in the last 5 years was Java Concurrency in Practice by Brian Goetz

4

Wicked Cool Java

4

Sam's Teach Yourself Java 6 in 21 Days is a great book. Great for someone completely new to programming

3

Nobody has mentioned Dietel & Dietel's How to Program Java . I love these books, especially for their exercises.

3

Practical Java by Haggar. Very similar to Effective Java.

3

Java Pitfalls

||
\/

Amazon LINK

3

Java Web Services Architecture published in 2003 by Morgan Kaufman

3

Beyond Java :)

3

Clean Code by Robert "Uncle Bob" Martin.

The question being "for every java developer" not "for people learning how to program", my answer is optimistic. If every every developer read this book, think of the world we could all live in!

The book shows and walks you through an infectious coding style that is readable, maintainable, promotes TDD and other valuable practices, and helps you identify what exactly it is about code that makes it good or bad.

Anything from the Robert C. Martin Series is good, but this is an excellent place to start. It can truly transform the way you read/write/maintain code.

You will learn syntax no matter what your first book is. Once that is down, something of this nature can change the game entirely.

2

First edition of Effective Java and then the second edition, to see some of the ideas that changed over time.

2

Java Threads by Scott Oaks. An excellent introduction to this difficult but important topic.

2

The Java Class Libraries by Chan Lee.

This started as a single volume, then was published as two, and who knows how it will evolve, however it is the Bible when writing Java. It's similar to but better than the online documentation.

Caution: You already have to know how to think in the object world - this isn't a beginners text, though it's an essential reference for beginners.

2

no ones said the elements of java style yet which i think is an awesome little book.

2

Java Performance Tuning - Jack Shirazi is also a good one

2

The Art and Science of Java is the best Java book I have ever read.

Also, thanks to the others users for giving such a wide range of books.

My personal favorites are: Art & Science of Java, Head First Java and Thinking in Java.

1

Also not really a Java only book, but one that would lead to less ugly Java code: Eric Evans -- "Domain-Driven Design". Read it and go tackle that complexity!

1

In my undergrad days I referred to " Java: A Framework for Program Design and Data Structures", Second Edition, by Kenneth Lambert, Martin Osborne . I has a lot of analysis on solving many standard problems and also demonstrates the design and implementation of various model classes to solve them.

1

I think tha java tutorials from Sun's website...you learn from the designer-implementor of the language.:)

1

Spring Recipes: A Problem-Solution Approach by Gary Mak. Great book and fast read.

1

Java Elements

good book,not very comprehensive though

1

It was said above that "Thinking in Java" by Bruce Eckel was available for free on his website. That is not entirely true: Editions 1-3 are available, but not the 4th edition, which is the only one that covers Java 5 and 6.

link text

1

Actually, to be honest, the only Java book I've read is "Java a as first programming language" by Mughal et al.

It's in Norwegian, but even so, it explains a great number of interesting topics, and it tells you a lot about not just java, but programming in general. (The book even discuss conds, and not just switches, so yes, it IS more than just java. (I like conds. And nested parens. (And LISP. Can you tell?)))

Anyway, if you speak Norwegian, then it is a great book.

Especially since it's in your native tongue, so the English terms are translated so there is a lot less to learn. English books expect you to speak native English, and so you spend as much time translating mathematical and technical terms as actually learning them.

Just to point out an example of why I like this book: The two 10 point courses it teaches (30 points per semester, so 2/3rds of a semester is covered within) does cover a lot of stuff, but no GUI. (Which is a good thing. If you ask me... :p) However, There is still a full sized chapter on swing and gui building, stuffed away as an appendix, because, well, it fit in somewhere.

1

"Java 6 The Complete Reference " ..................................................................................................................................................................... ...the first book i learned while diving into the ocean of JAVA...

1

Program Development in Java by Liskov and Guttag, though academic in nature, is an excellent book to learn about object oriented design using Java.

Program Development in Java

1

enter image description here

Amazing book for beginners, such as programming and object-oriented.

0

I vouch for Data Structures in Java ...

0

Jakarta Commons Book is good too

0

Thinking in Java by Bruce Eckel is the best java book for "how and why"

0

Well, Another book which proved helpful is 'Java Precisely' by Peter Sestoft in its second edition (Covering JDK 5)

enter image description here

This book contains the basics of the Java language condensed to about 150 pages. It may not prove to be efficient for learning, but rather for looking up things quickly, or to get in touch with the syntax and basic structures in Java.

0

Sun certified programmer for Java 5 by Kathy Sierra

  • (+) explains several topics in more details
  • (-) some topics are not included (contains only what you need to pass an exam)
  • (+) contains tricky exam questions
  • (+) Kathy is very good teacher

Of course, the SCJP5 is a little bit obsolete, but I haven't read the SCJP6.

Sun certified programmer for Java 5

0

Effective Java by Bloch

It's a thin(!!) volume that focuses on real issues and how to think about the right approach to java problems. (as opposed to a listing of API methods)

0

Thinking In Java by Bruce Eckel is a great book for beginners and teaches you not only the "What"s and "How"s of Java but also the "Why"s.

It is available as a free download at the above link.

0

Thinking In Java - Bruce Eckel

0

Thinking in Java by Bruce Eckel. It is an introduction and yet discusses the background behind Generics, Swing, elementary threading, and a large metaphor for Java NIO. It is a massive work that covers the range from beginner to expert. There are other books that are better for experts but would be wasted on novices.

0

So suprised that no one said Core Java Vol 1 and 2 by Cay S. Horstmann. It is good and detailed.

0

For any java developer,here's should be the sequence of reading the books:

  1. Head First Java (What and how it happens in Java).
  2. Thinking in Java (What,how + Why it happens so).
  3. Java Programming Lang by James Gosling (Get knowledge about each cut-corners in Java).
  4. Effective Java (Explore the java world).
0

I would say Thinking in Java 4th edition

-1

Eloquent JavaScript A Modern Introduction to Programming by Marijn Haverbeke

Delivered as a online book that allows all the examples and exercises to be executed in the browser with a little display window. Also available in a dead tree version.

http://eloquentjavascript.net/

enter image description here

-1

what do u think about " Java , How to programming " ? is that best one ?

-1

Effective Java

-1

Effective Java

-1

I really wish you had worded the title of this question so that I could answer with books I have read in the future!

-2

Effective Java, Second Edition

-12

"Programming in C#"