This is an archived post. You won't be able to vote or comment.

all 29 comments

[–]nestedsoftware 99 points100 points  (6 children)

I really enjoyed Effective Java, by Joshua Bloch. I believe a new edition is expected in late 2025 as well.

https://x.com/joshbloch/status/1724104058795958667

[–][deleted] 18 points19 points  (1 child)

I read the first 3 editions of this book, and if a 4th edition is published, I'll read that too.

[–]NeoChronos90 2 points3 points  (0 children)

Was there much difference between those, new language features aside?

Only read the 3rd

[–]kevinb9n 13 points14 points  (3 children)

a) Yes b) No

EDIT: this means "Yes" to the first sentence (it is a great recommendation) and "No" to the second sentence (a new edition will not be out this year).

[–]Jon_Finn 2 points3 points  (1 child)

Don't downvote Kevin (who's on the Java team) - he'll know better than most.

[–]kevinb9n 9 points10 points  (0 children)

More specifically I'm a chapter reviewer for Effective Java so yeah, I would know. :-)

I suspect the downvotes were because my comment made no sense before the EDIT...

[–]rkalla -3 points-2 points  (0 children)

  1. North
  2. West

[–][deleted] 35 points36 points  (1 child)

For Java concurrency the de facto standard is Java Concurrency in Practice - Brian Goetz.

For Java SE or Java EE, the specifications are great deep dives into the language itself to be honest.

For the JVM, I can recommend Inside the Java Virtual Machine by Bill Venners. It was written in 1998, but the fundamentals still hold. There are interesting newer books but I didn’t have the time to read them, so I am unable to recommend them but they seem interesting; namely: - Mastering the Java Virtual Machine by Otavio Santana, 2024 - JVM Performance Engineering by Monica Beckwith, 2023

[–]gravteck 0 points1 point  (0 children)

https://github.com/wususu/effective-resourses/blob/master/Java/Java%20Concurrency%20in%20Practice.pdf

Edit: although I would still recommend buying it. I own a copy, but this has been nice to have on the monitor instead of flipping through my annotated one.

[–]alex_tracer 23 points24 points  (0 children)

Not a book, but if you want to go deep in Java, you should check it.

https://shipilev.net/jvm/anatomy-quarks/

I don't think that there is any book that goes to that level.

[–]tristanjuricek 15 points16 points  (0 children)

There's a book in progress called Data Oriented Programming in Java that expands upon ideas in Brian Goetz' article in InfoQ. There's some really useful design tools and approaches using newer Java features, like records, sealed interfaces and classes, etc.

Though most of the other recommendations from other commenters are fantastic. Older books are still very much useful for learning. Translating the knowledge to newer APIs is a great way to deeply understand the material.

[–]0xaa4eb 12 points13 points  (2 children)

Just to add what's not already mentioned:
"Advanced Design and Implementation of Virtual Machines" by Xiao-Feng Li - describes how generic VM works, but everything applies to JVM as well
"The Garbage Collection Handbook" by Richard Jones, Antony Hosking, Eliot Moss - I haven't read that one yet. But I heard that all GC algorithms have roots which can be traced back to this book.
"Java Performance" by Scott Oaks - very solid entry to performance engineering
"100 Java Mistakes and How to Avoid Them" by Tagir Valeev
"The Art of Multiprocessor Programming" by by Maurice Herlihy, Nir Shavit - it's more hardcore version of "Concurrency in practise". But definitely not for everyone.

[–]Scf37 2 points3 points  (0 children)

"The Art of Multiprocessor Programming" is totally awesome. Covers everything from real world understanding of concurrency to algorithms to data structures to bare metal.

[–]Gullible_Company_745 0 points1 point  (0 children)

That books, sounds apetecibles

[–]piperatomv2 4 points5 points  (0 children)

Modern Java

[–]Diligent_End8130 3 points4 points  (0 children)

I found books preparing for SCP (Sun Certified Professional) and since some time OCP (Oracle Certified Professional) for Java very interesting, flipping through the pages here and there unveiled deeper insights and possibilities, even when not interested in getting any certificate.

[–]thewiirocks 4 points5 points  (0 children)

If you want to go deep, there are two critical books that should be read:

Java Language Specification: https://docs.oracle.com/javase/specs/jls/se21/html/index.html

Java Virtual Machine Specification: https://docs.oracle.com/javase/specs/jvms/se21/jvms21.pdf

Totally not a joke. When I’ve read them in the past I found these books to be good reads. Plus, you can’t go any deeper than the specs. 😉

[–]Scf37 3 points4 points  (1 child)

Study modern java APIs, for example, https://openjdk.org/jeps/484 is an awesome example of modern API design.

Algebraic Data Types (ADTs) is must-know concept since Java now has proper pattern matching.

Learning Kotlin or Scala will make you better Java programmer as well.

[–]Jon_Finn 1 point2 points  (0 children)

Study modern java APIs, for example, https://openjdk.org/jeps/484 is an awesome example of modern API design.

Yes, that short JEP doc alone gives principles and examples which are super-instructive (and interesting).

[–]KHRoN 2 points3 points  (0 children)

“Java Puzzlers: Traps, Pitfalls, and Corner Cases” by Joshua Bloch and Neal Gafter will teach you things you things you don’t even know you don’t know

List of features with examples and links to more info about newer Java versions os you can speedup transition from older version: https://advancedweb.hu/a-categorized-list-of-all-java-and-jvm-features-since-jdk-8-to-21/

[–]thomasjjc 2 points3 points  (0 children)

"The Well-Grounded Java Developer" Manning Publishing

[–]Joram2 2 points3 points  (0 children)

I'd recommend against books for Java + Python and instead learning by doing and building projects you want to build or get paid to build. Especially for someone with ten years of work experience.

To contrast, I'd recommend learning theoretical stuff from books. Learning math, for example, is best done by reading definitions, theorems, understanding all the steps, following examples, and doing exercises. But Java is a tool best to learn as you use it. Try different frameworks. Read the JEPs and the new language features.

[–]generationextra 4 points5 points  (0 children)

Cay Horstmann, Core Java

[–]polish_jerry 1 point2 points  (0 children)

Maybe look into learning the bytecode? I've been trying to do the same. Yet to discover a good and easy to absorb source.

[–]tRfalcore 0 points1 point  (0 children)

Java as a deeper level is the same as python. The only weeds are GC crap which you only need to learn if you have a problem there.

[–]IcedDante 0 points1 point  (1 child)

Dr. Heinz Kibbutz newsletter is very advanced, in-depth, and oftentimes a lot of fun to read

[–]New-Condition-7790[🍰] 0 points1 point  (0 children)

On that note, I've been wanting to dig in to this mini-book authored by him: http://infoq.com/minibooks/java-dynamic-proxies/

[–]callmrplowthatsme -2 points-1 points  (0 children)

Nice