Which Java book do you think is the must-have one for all Java developers?
Keep in mind:
Effective Java, Second Edition [1] 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 [2] (see separate answer [3]), and maybe Java Generics and Collections [4] (see separate answer [5]). 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 [6]: 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 [7]: First edition of Effective Java [8] and then the second edition [9], to see some of the ideas that changed over time.
[1] http://www.amazon.com/Effective-Java-2nd-Joshua-Bloch/dp/0321356683/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1221587967&sr=8-1Thinking in Java [1] by Bruce Eckel
Comments from duplicate answers:
prash [2]: 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 [3]: 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.
[1] http://mindview.net/Books/TIJ4When it comes to multithreading, Java Concurrency in Practice [1] is the choice.
[1] http://rads.stackoverflow.com/amzn/click/0321349601Head First Design Patterns [1] - not necessarily a pure Java book, but essential for every Java developers who designs his applications himself.
[1] http://rads.stackoverflow.com/amzn/click/0596007124Java Puzzlers [1] is another great one by Joshua Bloch (with Neal Gafter).
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.
[1] http://www.javapuzzlers.com/Head First Java [1] is great for beginners.
Effective Java [2] will take you from journeyman to master.
[1] http://oreilly.com/catalog/9780596004651/Refactoring [1] by Martin Fowler
Especially the chapter about Bad Smells in Code should be understood by everyone.
[1] http://www.martinfowler.com/books.html#refactoringJava Programming Language [1] is a good way to learn Java. I would highly recommend it.
[1] http://rads.stackoverflow.com/amzn/click/0321349806Core Java Vol 1 [1] and Vol 2 [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.
[1] http://rads.stackoverflow.com/amzn/click/0132354764O'Reilly's Java in a Nutshell [1] is a good book for both tutorials and reference.
[1] http://oreilly.com/catalog/9781565924871/Java Generics and Collections [1] 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.
[1] http://oreilly.com/catalog/9780596527754/Java Language Specification [1] (also freely available online [2]) is great if you want to get deeper into the semantics of Java language.
(Links and comments above merged from a duplicate answer by folone [3].)
[1] http://rads.stackoverflow.com/amzn/click/03212467801000 Java Tips [1] Alexandre Patchine, Dr. Heinz M. Kabutz | Published in 2005, 856 pages
A Java GUI Programmer's Primer [2] Fintan Culwin, Dintan Culwin | Prentice Hall Published in 1998, 322 pages
Advanced Programming for the Java 2 Platform [3] Calvin Austin, Monica Pawlan | Addison Wesley Longman Published in 2000, 400 pages
Apache Jakarta Commons: Reusable Java Components [4] Will Iverson | Prentice Hall PTR Published in 2005, 360 pages
Beyond Java [5] Bruce Tate | O'Reilly Media, Inc. Published in 2005, 200 pages
Bleeding at the Keyboard: A Guide to Modern Programming with Java [6] Gregory J. E. Rawlins | Published in 1999
Brewing Java: A Tutorial [7] Elliotte Rusty Harold | Cafe au Lait Published in 2005
Concurrent Programming Using Java [8] Stephen J. Hartley | Published in 2005
Core Servlets and Javaserver Pages [9] Marty Hall, Larry Brown | Prentice Hall PTR Published in 2003, 736 pages
Data Structures and Algorithms with Object-Oriented Design Patterns in Java [10] Bruno R. Preiss | Wiley Published in 1999, 656 pages
Designing Enterprise Applications with the J2EE Platform [11] Inderjeet Singh, at al. | Prentice Hall PTR Published in 2002, 448 pages
Designing Web Services with the J2EE 1.4 Platform [12] Inderjeet Singh, at al. | Prentice Hall PTR Published in 2004, 464 pages
Developing with Eclipse and Maven [13] by Tim O'Brien, at al. | Sonatype, Inc. Published in 2009, 74 pages
EJB Design Patterns: Advanced Patterns, Processes, and Idioms [14] Floyd Marinescu | Wiley Published in 2002, 288 pages
Essentials of the Java Programming Language: A Hands-On Guide 1 [15] - 2 [16] Monica Pawlan | Addison-Wesley Professional Published in 2000, 301 pages
Evaluating Java for Game Development [17] Jacob Marner | Published in 2002, 314 pages
Finite-state Automata in Java [18] Bradley Kjell | Cental Connecticut State University Published in 2001
From Java to Sumatra [19] Leendert van Gastel, Andr� Heck | Amstel Institute Published in 1997
Getting Started with the Java 3D API [20] Dennis J. Bouvier | Sun Microsystems, Inc. Published in 1999
How to Think Like a Computer Scientist (Java Version) [21] Allen B. Downey | Green Tea Press Published in 2008, 306 pages
HTTP Programming Recipes for Java Bots [22] Jeff Heaton | Heaton Research, Inc. Published in 2007, 680 pages
Interactive Programming In Java [23] Lynn Andrea Stein | Morgan Kaufmann Publishers Published in 2003, 545 pages
Introduction to Computer Science using Java [24] Bradley Kjell | Central Connecticut State University Published in 2006
Introduction to Java and OOA/OOD for Web Applications [25] Alvin J. Alexander | DevDaily.com Published in 2002
Introduction to Neural Networks for Java [26] Jeff Heaton | Heaton Research, Inc. Published in 2008, 440 pages
Introduction to Programming Using Java, Fifth Edition [27] David J. Eck | Published in 2006, 690 pages
Jakarta Struts Live [28] Richard Hightower | SourceBeat Published in 2004, 273 pages
Java - Servlets - JSP [29] V. Mukhi, S. Mukhi, N. Kotecha | bpbonline.com
Java Application Development on Linux [30] Carl Albing, Michael Schwarz | Prentice Hall PTR Published in 2004, 600 pages
Java Au Naturel [31] Dr. William C. Jones, Jr. | Published in 2004
Java Authentication and Authorization Service (JAAS) in Action [32] Michael Cote | Published in 2005
Java AWT Reference [33] John Zukowski | O'Reilly Published in 1997, 1074 pages
Java for the Beginning Programmer [34] Jeff Heaton | Heaton Research, Inc. Published in 2006, 336 pages
Java in a Nutshell [35] David Flanagan | O'Reilly Published in 1997, 628 pages
Java Language Reference [36] Mark Grand | O'Reilly Published in 1997, 492 pages
Java Look and Feel Design Guidelines, 2nd Edition [37] Sun Microsystems Inc. | Addison-Wesley Professional Published in 2001, 416 pages
Java Look and Feel Design Guidelines: Advanced Topics [38] | Addison-Wesley Professional Published in 2001, 200 pages
Java Native Interface: Programmer's Guide and Specification [39] Sheng Liang | Prentice Hall PTR Published in 1999, 320 pages
Java Precisely [40] Peter Sestoft | IT University of Copenhagen Published in 2000, 68 pages
Java Sound Programmer Guide [41] | Sun Microsystems, Inc. Published in 2002
Java Speech API Programmer's Guide [42] | Sun Microsystems, Inc. Published in 1998
Java Structures: Data Structures in Java for the Principled Programmer [43] Duane A. Bailey | McGraw-Hill Published in 2007, 542 pages
Java Testing and Design [44] Frank Cohen | Prentice Hall PTR Published in 2004, 544 pages
Java(TM) Platform Performance: Strategies and Tactics [45] Steve Wilson, Jeff Kesselman | Prentice Hall PTR Published in 2000, 256 pages
Java: An Object First Approach [46] Fintan Culwin | Prentice Hall Published in 1997, 393 pages
Java: Classes in Java Applications [47] David Etheridge | BookBoon Published in 2009, 118 pages
Java: Graphical User Interfaces [48] David Etheridge | BookBoon Published in 2009, 101 pages
Java: The Fundamentals of Objects and Classes [49] David Etheridge | BookBoon Published in 2009, 92 pages
JSF Jumpstart [50] John Ferguson Smart | Wakaleo Consulting Ltd Published in 2007, 67 pages
JXTA [51] Brendon J. Wilson | New Riders Publishing Published in 2002, 350 pages
Killer Game Programming in Java [52] Andrew Davison | O'Reilly Media Published in 2009
Learn Internet Game Programming with Java [53] | Soft Lookup Corp. Published in 2004
Mastering Enterprise JavaBeans 3.0 [54] R. P. Sriganesh, G. Brose, M. Silverman | Wiley Published in 2007, 685 pages
Mathematical Computation [55] Ian Craw | University of Aberdeen Published in 2003, 156 pages
Maven by Example [56] Tim O'Brien, at al. | Sonatype, Inc. Published in 2010
Maven Handbook [57] Tim O'Brien, Stuart McCulloch | Sonatype, Inc. Published in 2009, 100 pages
Maven: The Definitive Guide [58] Sonatype Company | O'Reilly Media, Inc. Published in 2008, 468 pages
More Servlets and JavaServer Pages [59] Marty Hall | Pearson Education Published in 2001, 752 pages
Object-Oriented Programming Using Java [60] David J. Eck, Anban Pillay | Published in 2007, 221 pages
Practical Artificial Intelligence Programming in Java [61] Mark Watson | Lulu.com Published in 2008, 222 pages
Processing XML with Java [62] Elliotte Rusty Harold | Addison-Wesley Professional Published in 2002, 1120 pages
Programming in Java Advanced Imaging [63] | Sun Microsystems, Inc. Published in 1999
Programming Principles in Java: Architectures and Interfaces [64] David Schmidt | Kansas State University Published in 2003, 748 pages
QuickTime for Java: A Developer's Notebook [65] Chris Adamson | O'Reilly Media, Inc. Published in 2005, 255 pages
Repository Management with Nexus [66] Tim O'Brien, at al. | Sonatype, Inc. Published in 2009, 226 pages
Sams Teach Yourself Java 2 in 24 Hours [67] Rogers Cadenhead, Mark Taber | Sams Published in 1999, 429 pages
Securing Java: Getting Down to Business with Mobile Code [68] Gary McGraw, Edward W. Felten | Wiley Published in 1999, 324 pages
Servlets and JavaServer Pages: The J2EE Technology Web Tier [69] Jayson Falkner, Kevin Jones | Addison-Wesley Published in 2003, 784 pages
Sun Certified Java Programmer Pre-Exam Essentials [70] Dylan Walsh | Published in 2002
Swing, 2nd Edition [71] Matthew Robinson, Pavel Vorobiev | Manning Publications Published in 2003, 912 pages
The Design Patterns Java Companion [72] James W. Cooper | Published in 1998, 218 pages
The J2EE 1.4 Tutorial [73] Eric Armstrong, at al. | Sun Microsystems, Inc. Published in 2006, 1542 pages
The J2EE Architect's Handbook [74] Derek C. Ashmore | DVT Press Published in 2004, 288 pages
The Java Game Development Tutorial [75] Fabian Birzele | Java Cooperation Published in 2004
The Java Language Specification, 3rd edition [76] James Gosling, Bill Joy, Guy Steele, Gilad Bracha | Prentice Hall PTR Published in 2005, 684 pages
The Java Virtual Machine Specification, 2nd Edition [77] Tim Lindholm, Frank Yellin | Prentice Hall PTR Published in 1999, 496 pages
The Java Web Services Tutorial [78] Eric Armstrong, et al | Pearson Education Published in 2005, 457 pages
Thinking in Enterprise Java [79] Bruce Eckel et. al. | MindView, Inc. Published in 2003
Thinking in Java, 3rd Edition [80] Bruce Eckel | Prentice Hall PTR Published in 2002, 1119 pages
Filthy Rich Clients [1], by Chet Haase and Romain Guy. Those guys are Swing ninjas.
[1] http://www.filthyrichclients.com/Better, Faster, Lighter Java [1] by Bruce A. Tate and Justin Gehtland
It's a really good one.
[1] http://www.onjava.com/catalog/bfljava/Data Structures and Algorithms in Java [1] by Robert Lafore. Nice book.
[1] http://rads.stackoverflow.com/amzn/click/0672324539If you want to understand, how it all works, The Java Virtual Machine Specification [1] (also freely available online [2]) is the book for you.
[1] http://www.amazon.com/exec/obidos/ISBN=0201432943/javasoftsunmicroA/Learning Java [1] has really helped me get up-to-speed.
And Hardcore Java [2] is an incredible follow-on for intermediate Java developers.
[1] http://rads.stackoverflow.com/amzn/click/0596008732Concurrent Programming in Java: Design Principles and Patterns by Doug Lea (2nd edition)
http://java.sun.com/docs/books/cp/
Agile Java: Crafting Code with Test-Driven Development [1] is what got me started on Test-Driven Development. It helped me a lot both learning TDD and Java at the same time.
[1] http://langrsoft.com/agileJava/Currently Reading through "Spring in Action" and so far it has a course set for one of my top java books.
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
Sam's Teach Yourself Java 6 in 21 Days [1] is a great book. Great for someone completely new to programming
[1] http://workbench.cadenhead.org/book/java-6-21-days/Nobody has mentioned Dietel & Dietel's How to Program Java . I love these books, especially for their exercises.
Java Threads [1] by Scott Oaks. An excellent introduction to this difficult but important topic.
[1] http://rads.stackoverflow.com/amzn/click/1565924185Practical Java [1] by Haggar. Very similar to Effective Java.
[1] http://rads.stackoverflow.com/amzn/click/0201616467Java Web Services Architecture published in 2003 by Morgan Kaufman
Clean Code [1] 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.
[1] http://rads.stackoverflow.com/amzn/click/0132350882First edition of Effective Java [1] and then the second edition [2], to see some of the ideas that changed over time.
[1] http://java.sun.com/developer/Books/effectivejava/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.
I think tha java tutorials from Sun's website...you learn from the designer-implementor of the language.:)
no ones said the elements of java style [1] yet which i think is an awesome little book.
[1] http://rads.stackoverflow.com/amzn/click/0521777682Java Performance Tuning - Jack Shirazi is also a good one
The Art and Science of Java [1] 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] http://books.google.co.in/books?id=jnhaAAAACAAJ&dq=art+and+science+of+java&hl=en&ei=Tg-BTLX-Os2HcYfvybIL&sa=X&oi=book_result&ct=result&resnum=1&ved=0CDIQ6AEwAAAlso 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!
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.
Spring Recipes: A Problem-Solution Approach [1] by Gary Mak. Great book and fast read.
[1] http://rads.stackoverflow.com/amzn/click/1590599799Java Elements [1]
good book,not very comprehensive though
[1] http://rads.stackoverflow.com/amzn/click/0072453400It 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]
[1] http://mindview.net/Books/TIJ4Actually, 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.
" Java 6 The Complete Reference [1] " ..................................................................................................................................................................... ...the first book i learned while diving into the ocean of JAVA...
[1] http://rads.stackoverflow.com/amzn/click/0072263857Program Development in Java [1] by Liskov and Guttag, though academic in nature, is an excellent book to learn about object oriented design using Java.
[1] http://rads.stackoverflow.com/amzn/click/0201657686Amazing book for beginners, such as programming and object-oriented.
I vouch for Data Structures in Java
Jakarta Commons Book is good too
Thinking in Java by Bruce Eckel is the best java book for "how and why"
Well, Another book which proved helpful is ' Java Precisely [1]' by Peter Sestoft in its second edition (Covering JDK 5)
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.
[1] http://rads.stackoverflow.com/amzn/click/0262693259Sun certified programmer for Java 5 by Kathy Sierra
Of course, the SCJP5 is a little bit obsolete, but I haven't read the SCJP6.
JUnit in Action (2nd edition) [1] is the book that has given my a flying start in Java unit and integration testing.
[1] http://www.manning.com/tahchiev/This is the first java book i read worth every penny!!