share
Stack OverflowBest Java book you have read so far
[+186] [53] dinsim
[2008-09-16 17:57:28]
[ java books polls ]
[ http://stackoverflow.com/questions/75102/best-java-book-you-have-read-so-far ] [DELETED]

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

Keep in mind:

[+304] [2008-09-16 17:58:58] Frank Pape [ACCEPTED]

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-1
[2] http://www.amazon.com/Java-Concurrency-Practice-Brian-Goetz/dp/0321349601/ref=pd_bxgy_b_text_b
[3] http://stackoverflow.com/questions/75102/best-java-book-you-have-read-so-far/2847993#2847993
[4] http://www.amazon.com/Java-Generics-Collections-Maurice-Naftalin/dp/0596527756/ref=pd_bxgy_b_text_b
[5] http://stackoverflow.com/questions/75102/best-java-book-you-have-read-so-far/76016#76016
[6] http://stackoverflow.com/users/10826/sammyo
[7] http://stackoverflow.com/users/9504/hans-doggen
[8] http://java.sun.com/developer/Books/effectivejava/
[9] http://java.sun.com/docs/books/effective/

yes, thanks i think these books are great, - dinsim
(13) Choosing an "answer" for this question is unfair. Each person answering posts their own opinion and the community votes the more relevant answers up. If a book better than EJ2 is released, this page might turn out to be useless, because one opinion is already anointed as the "answer". - Binil Thomas
You make a fair point -- it's not necessarily appropriate to accept an answer for a subjective question -- although one of the nice things about SO is that this entry can always be edited if it becomes outdated. - Frank Pape
(6) "If every Java developer read this book ..." what you wanna say is "If every Java developer read and understood this book ..." - Chris
James Gosling also mentioned that he needs this book. - Cheok Yan Cheng
(5) +1000 for Effective Java, I have been reading this every day during my lunch break, and it's hands-down one of the best programming books I've ever read. - BlueRaja - Danny Pflughoeft
(3) @binil I don't see how any Java book could ever become more important than Effective Java 2nd ed. except for maybe... Effective Java 3rd ed. - jluzwick
1
[+79] [2008-09-16 18:01:16] DavidGR

Thinking 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/TIJ4
[2] http://stackoverflow.com/questions/75102/best-java-book-you-have-read-so-far/75225#75225
[3] http://stackoverflow.com/users/12704/michael-easter

I got this book in 2001 and it depresses me that I didn't read it :( Bruce Eckel is a great author, it just didn't work for me as a total newbie to programming. I didn't really understand why to create a class or method what I could do with these concepts. - Cole
If only the examples worked with a newer version of Java... - syrion
2
[+67] [2010-05-17 09:44:50] folone

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

[1] http://rads.stackoverflow.com/amzn/click/0321349601

(3) Brilliant brilliant book. I guess I'm considered something of a concurrency expert at my employer, yet every time I look in this book I go "wow, I didn't realise it worked like that". - Cowan
3
[+63] [2008-09-16 20:04:15] Yaba

Head 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/0596007124

Essential, eh? Even for those who've already learned about design patterns e.g. from the original GoF book? - Jonik
(1) -1 on this one, sorry. Design patterns are better discovered than learned. - BlueRaja - Danny Pflughoeft
(3) @Jonik, yes - even those that learned patterns from the GoF book as this book teaches you how Design patterns are evolved and principles behind a pattern. It teaches you how to discover patterns instead of learning it. @BlueRaja... I agree and that's exactly the reason why I recommend this book. Too bad you haven't read it bevor voting down ;-) - Yaba
4
[+62] [2008-09-16 19:22:10] Kamikaze Mercenary

Java Puzzlers [1] 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.

[1] http://www.javapuzzlers.com/

(1) by J Bloch and N Gafter - Michael Easter
Good book with some real mind benders but to me underlines the importance of unit testing. - ishmeister
5
[+51] [2008-09-16 18:05:54] Bill the Lizard

Head First Java [1] is great for beginners.

Effective Java [2] will take you from journeyman to master.

[1] http://oreilly.com/catalog/9780596004651/
[2] http://java.sun.com/docs/books/effective/

6
[+41] [2008-09-21 21:19:24] Roland

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#refactoring

7
[+27] [2009-01-05 08:18:26] kal

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

[1] http://rads.stackoverflow.com/amzn/click/0321349806

(3) This is the second best book after Effective Java (but one should read this at first). I don't understand why it got only one vote before my vote. This is the only book that could explain to me Java Generics. I wish I had discovered earlier. - zilupe
8
[+23] [2008-09-16 19:38:35] Serik

Core 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/0132354764
[2] http://rads.stackoverflow.com/amzn/click/0132354799

+1 because these are good and deserve to get noticed, even if they aren't nearly the best Java books. - Jonik
9
[+17] [2008-09-16 17:59:23] toluju

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

[1] http://oreilly.com/catalog/9781565924871/

(1) This book only covers up to Java 5 so it might be a bit outdated as a reference. - Li Lo
I particularly liked the Java Examples in a Nutshell book from that series, not because it was full of idiomatic code (it wasn't; my version is massively outdated!) but because it is great at inspiring me to try to do new things with Java. - Donal Fellows
10
[+14] [2008-09-16 19:28:48] WolfmanDragon

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/

How did you find Java Generics different from C++'s templates? - ShaChris23
11
[+13] [2008-09-17 05:07:26] stepancheg

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/0321246780
[2] http://java.sun.com/docs/books/jls/
[3] http://stackoverflow.com/users/163423/folone

12
[+10] [2011-03-09 08:12:42] Soner Gönül
  1. 1000 Java Tips [1] Alexandre Patchine, Dr. Heinz M. Kabutz | Published in 2005, 856 pages

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  18. From Java to Sumatra [19] Leendert van Gastel, Andr� Heck | Amstel Institute Published in 1997

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[1] http://www.javaa.com/100/high.zip
[2] http://www.scism.lsbu.ac.uk/jfl/jibook/jicontents.html
[3] http://java.sun.com/developer/onlineTraining/Downloads/JDCBook.zip
[4] http://www.informit.com/content/images/0131478303/downloads/Iverson_book.pdf
[5] http://commons.oreilly.com/wiki/index.php/Beyond_Java
[6] http://www.roxie.org/books/bleeding/tableofcontents.html
[7] http://www.cafeaulait.org/javatutorial.html
[8] http://www.cs.drexel.edu/~shartley/ConcProgJava/index.html
[9] http://pdf.coreservlets.com/
[10] http://www.brpreiss.com/books/opus5/html/book.html
[11] http://java.sun.com/blueprints/guidelines/designing_enterprise_applications_2e/DEA2eTOC.html
[12] http://java.sun.com/blueprints/guidelines/designing_webservices/html/
[13] http://www.sonatype.com/books/m2eclipse-book/reference/
[14] http://www.theserverside.com/books/wiley/EJBDesignPatterns/downloads/ejbdesignpatterns.pdf
[15] http://java.sun.com/developer/onlineTraining/Downloads/BasicJava1.zip
[16] http://java.sun.com/developer/onlineTraining/Downloads/BasicJava2.zip
[17] http://java.coe.psu.ac.th/FreeOnline/Evaluating%20Java%20for%20Game%20Development.pdf
[18] http://chortle.ccsu.edu/CS355/FiniteAutomata/Automata.html
[19] http://staff.science.uva.nl/~heck/JAVAcourse/s.html
[20] http://java.sun.com/developer/onlineTraining/java3d/javaa3d.zip
[21] http://www.greenteapress.com/thinkapjava/thinkapjava.pdf
[22] http://www.heatonresearch.com/articles/series/16
[23] http://www.cs101.org/ipij/
[24] http://chortle.ccsu.edu/CS151/cs151java.html
[25] http://www.devdaily.com/java/java_oo/java_oo.shtml
[26] http://www.heatonresearch.com/online/introduction-neural-networks-java-edition-2
[27] http://math.hws.edu/eck/cs124/downloads/javanotes5-linked.pdf
[28] http://www.theserverside.com/books/sourcebeat/JakartaStrutsLive/downloads/JakartaStrutsLive.zip
[29] http://www.vijaymukhi.com/documents/books/javajsp/contents.html
[30] http://www.informit.com/content/images/013143697X/downloads/013143697X_book.pdf
[31] http://www.cs.ccsu.edu/~jones/zipbook.zip
[32] http://www.jaasbook.com/
[33] http://oreilly.com/catalog/javawt/book/index.html
[34] http://www.heatonresearch.com/articles/series/15
[35] http://www.goldfish.org/books/O%5C%27Reilly%20Java%20CD%20Bookshelf/javanut/index.htm
[36] http://www.goldfish.org/books/O%5C%27Reilly%20Java%20CD%20Bookshelf/langref/index.htm
[37] http://java.sun.com/products/jlf/ed2/book/index.html
[38] http://java.sun.com/products/jlf/at/book/ATTitle.alt.html
[39] http://java.sun.com/docs/books/jni/download/jni.pdf
[40] http://www.dina.kvl.dk/~sestoft/javaprecisely/
[41] http://java.sun.com/j2se/1.4.2/docs/guide/sound/programmer_guide/contents.html
[42] http://java.sun.com/products/java-media/speech/forDevelopers/jsapi-guide/index.html
[43] http://www.cs.williams.edu/JavaStructures/Book.html
[44] http://www.theserverside.com/news/1369774/Free-Book-Java-Testing-and-Design
[45] http://java.sun.com/docs/books/performance/1st_edition/html/JPTitle.fm.html
[46] http://burks.bton.ac.uk/burks/language/java/jof/jflconte.htm
[47] http://bookboon.com/int/student/it/an-introduction-to-java-programming-2
[48] http://bookboon.com/int/student/it/an-introduction-to-java-programming-3
[49] http://bookboon.com/int/student/it/an-introduction-of-java-programming
[50] http://www.wakaleo.com/resources/jsf-jumpstarter-book
[51] http://www.brendonwilson.com/projects/jxta-book/
[52] http://fivedots.coe.psu.ac.th/~ad/jg/index.html
[53] http://www.softlookup.com/tutorial/games/
[54] http://www.theserverside.com/tt/books/wiley/masteringEJB3/downloads/MasteringEJB4thEd.pdf
[55] http://www.maths.abdn.ac.uk/~igc/tch/mx3015/index/index.html
[56] http://www.sonatype.com/books/mvnex-book/reference/public-book.html
[57] http://www.sonatype.com/books/mhandbook/reference/
[58] http://www.sonatype.com/book/pdf/maven-definitive-guide.pdf
[59] http://pdf.moreservlets.com/
[60] http://www.e-booksdirectory.com/details.php?ebook=291
[61] http://www.markwatson.com/opencontent/JavaAI3rd.pdf
[62] http://www.cafeconleche.org/books/xmljava/
[63] http://java.sun.com/products/java-media/jai/forDevelopers/jai1_0_1guide-unc/
[64] http://www.cis.ksu.edu/santos/schmidt/PPJv12pdf.zip
[65] http://commons.oreilly.com/wiki/index.php/QuickTime_for_Java%3a_A_Developer%27s_Notebook
[66] http://www.sonatype.com/books/nexus-book/reference/
[67] http://www.informit.com/library/library.aspx?b=STY_Java2_24hours
[68] http://www.securingjava.com/toc.html
[69] http://www.theserverside.com/books/addisonwesley/ServletsJSP/downloads/FalknerJones.zip
[70] http://www.jchq.net/essentials/printer.htm
[71] http://www.javafaq.nu/java/free-swing-book/
[72] http://www.patterndepot.com/put/8/DesignJavaPDF.ZIP
[73] http://java.sun.com/j2ee/1.4/docs/tutorial/doc/J2EETutorial.pdf
[74] http://www.theserverside.com/books/DVTPress/J2EEArchitectsHandbook/downloads/J2EEArchitectHandbook.zip
[75] http://www.javacooperation.gmxhome.de/TutorialStartEng.html
[76] http://java.sun.com/docs/books/jls/download/langspec-3.0.pdf
[77] http://java.sun.com/docs/books/jvms/second_edition/html/VMSpecTOC.doc.html
[78] http://java.sun.com/webservices/docs/1.6/tutorial/doc/JavaWSTutorial.pdf
[79] http://www.ibiblio.org/pub/docs/books/eckel/TIEJv1.1.zip
[80] http://www.mindviewinc.com/downloads/TIJ-3rd-edition4.0.zip

(2) I think you wrote an application to generate this answer... - Martijn Courteaux
@Martijin No. Why did you think like that ? - Soner Gönül
(1) +1 for your effort. @.@ - Emerald214
(1) Ok, lots of Java books, but... what's the point? Which ones are good and which are not? This misses the question completely. - Jonik
Exactly. That 1000 java tips one is dreadful. - Poldie
13
[+9] [2008-09-16 18:01:08] jodonnell

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

[1] http://www.filthyrichclients.com/

14
[+9] [2008-09-16 18:28:40] fernandogarcez

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/

(3) It's good, but a little dated, I find. For example, the whole anti-EJB diatribe is a bit boring to read in 2008, since that debate was settled so long ago, now. To me, The Pragmatic Programmer's way of presenting principles and techniques is more timeless. - Mwanji Ezana
(1) +-0 I agree with Mwanji. The promise of the book (from the back cover or Amazon summary) seemed great. But for me, it didn't really deliver: nothing that new; examples not especially well thought out; not written in a very engaging manner (when compared to the best Java books I've read). - Jonik
15
[+9] [2010-07-22 00:22:20] Samit G.

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

alt text

[1] http://rads.stackoverflow.com/amzn/click/0672324539

+1 I agree that it is nice book, not the best I've read but is the first I read - ant
+1 the nice thing about this book is that not only you learn java but also learn the very basic algorithms and data structures - chepukha
16
[+8] [2010-05-17 10:09:45] folone

If 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/
[2] http://java.sun.com/docs/books/jvms/

17
[+6] [2009-02-06 13:07:30] Nate

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/0596008732
[2] http://rads.stackoverflow.com/amzn/click/0596005687

I agree. One of the best computer books I've ever read - Santiago Cepas
18
[+6] [2010-06-18 02:44:24] Miro A.

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

Concurrent Programming in Java

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


19
[+4] [2008-09-16 17:59:48] Gilligan

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/

20
[+4] [2008-09-16 19:46:46] Brad Gardner

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


21
[+4] [2008-09-17 02:08:11] Bryan Young

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


I second your statement about Java Concurrency in Practice. - Ringding
Once cannot do it for Effective Java. Many of the concepts takes time to settle in your mind. - Thorbjørn Ravn Andersen
-1 duplicate on 2 counts. Plus only one book per answer was asked. - Péter Török
22
[+4] [2008-09-24 07:21:09] John Wright

Wicked Cool Java [1]

[1] http://www.wickedcooljava.com/

23
[+4] [2010-05-12 08:51:35] alexganose

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/

(1) Why the down-vote? I'll bet someone got something good out of it. I think people slam these books "just because." - kirk.burleson
Whoever downvoted was not fair. The OP asked for what's "best Java book you've read so far." Alexganose gave his opinion, so why downvoted him? I voted +1 to even this out. - ShaChris23
24
[+3] [2008-09-16 18:03:34] chessguy

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


Too thick... Compare with Effective Java! - Thorbjørn Ravn Andersen
A read for any ambitious beginner - H-H
25
[+3] [2008-09-16 18:06:35] Dave Webb

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

[1] http://rads.stackoverflow.com/amzn/click/1565924185

26
[+3] [2008-09-16 18:13:47] warsze

Practical Java [1] by Haggar. Very similar to Effective Java.

[1] http://rads.stackoverflow.com/amzn/click/0201616467

27
[+3] [2008-09-16 19:29:04] Drakiula

Java Pitfalls

||
\/

Amazon LINK [1]

[1] http://rads.stackoverflow.com/amzn/click/0471361747

28
[+3] [2009-04-14 10:47:02] McGovernTheory

Java Web Services Architecture published in 2003 by Morgan Kaufman


29
[+3] [2009-04-14 11:28:35] Andrei Vajna II

Beyond Java [1] :)

[1] http://rads.stackoverflow.com/amzn/click/0596100949

30
[+3] [2011-02-16 18:03:16] Matthew

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/0132350882

31
[+2] [2008-09-16 18:06:19] Hans Doggen

First 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/
[2] http://java.sun.com/docs/books/effective/

-1 for duplicate. - Péter Török
32
[+2] [2008-09-16 18:27:54] rtroy

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.


33
[+2] [2009-09-18 09:21:24] auper8921

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


34
[+2] [2009-10-14 20:53:13] krystan honour

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/0521777682

35
[+2] [2010-06-12 21:09:12] user365397

Java Performance Tuning - Jack Shirazi is also a good one


36
[+2] [2010-09-03 15:09:41] ykombinator

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=0CDIQ6AEwAA

37
[+1] [2009-04-14 11:13:18] Johannes Stiehler

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 I've heard smart people praise this one. And the part (about Modules) I've actually read so far was very clearly written. - Jonik
38
[+1] [2009-08-11 17:37:59] iceman

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.


39
[+1] [2010-07-22 00:29:38] Samit G.

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

[1] http://rads.stackoverflow.com/amzn/click/1590599799

40
[+1] [2010-08-02 00:24:41] Mahmoud Hossam

Java Elements [1]

good book,not very comprehensive though

[1] http://rads.stackoverflow.com/amzn/click/0072453400

41
[+1] [2010-09-29 09:33:46] Steps

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]

[1] http://mindview.net/Books/TIJ4

42
[+1] [2010-11-15 22:51:06] user508866

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.


43
[+1] [2010-12-29 19:28:39] Prayag Upd

" 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/0072263857

44
[+1] [2011-02-09 05:12:34] Sriram

Program Development in Java [1] 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] http://rads.stackoverflow.com/amzn/click/0201657686

45
[+1] [2011-03-08 19:11:02] mateusmaso

enter image description here

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


46
[0] [2010-11-25 18:39:55] Kim Jong Woo

I vouch for Data Structures in Java ...


47
[0] [2011-03-09 14:39:06] shilox

Jakarta Commons Book is good too


48
[0] [2011-03-31 20:10:04] user656189

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


49
[0] [2011-04-02 23:44:24] Daniyal

Well, Another book which proved helpful is ' Java Precisely [1]' 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.

[1] http://rads.stackoverflow.com/amzn/click/0262693259

50
[0] [2011-04-08 14:13:35] Kojotak

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


51
[0] [2011-06-13 15:55:45] Ben

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/

52
[0] [2011-07-04 10:19:57] cowtipper

Big java by cay horstmann

This is the first java book i read worth every penny!!


53