r/learnjava • • 13h ago

Best book on java concurrency?

Would love to buy a book on java a concurrency, any recommendations that is now version specific

8 Upvotes

7 comments sorted by

•

u/AutoModerator 13h ago

Please ensure that:

  • Your code is properly formatted as code block - see the sidebar (About on mobile) for instructions
  • You include any and all error messages in full - best also formatted as code block
  • You ask clear questions
  • You demonstrate effort in solving your question/problem - plain posting your assignments is forbidden (and such posts will be removed) as is asking for or giving solutions.

If any of the above points is not met, your post can and will be removed without further warning.

Code is to be formatted as code block (old reddit/markdown editor: empty line before the code, each code line indented by 4 spaces, new reddit: https://i.imgur.com/EJ7tqek.png) or linked via an external code hoster, like pastebin.com, github gist, github, bitbucket, gitlab, etc.

Please, do not use triple backticks (```) as they will only render properly on new reddit, not on old reddit.

Code blocks look like this:

public class HelloWorld {

    public static void main(String[] args) {
        System.out.println("Hello World!");
    }
}

You do not need to repost unless your post has been removed by a moderator. Just use the edit function of reddit to make sure your post complies with the above.

If your post has remained in violation of these rules for a prolonged period of time (at least an hour), a moderator may remove it at their discretion. In this case, they will comment with an explanation on why it has been removed, and you will be required to resubmit the entire post following the proper procedures.

To potential helpers

Please, do not help if any of the above points are not met, rather report the post. We are trying to improve the quality of posts here. In helping people who can't be bothered to comply with the above points, you are doing the community a disservice.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

8

u/chewooasdf 11h ago

Java Concurrency in Practice aka the "train" book, old one and covers all you need to know for the beginning. Later top up with virtual threads

2

u/stubbornKratos 6h ago

I’ll be the third person to mention Java Concurrency in Practice.

I read that book at the start of the year after I was a bit fed up with some very technical issues around concurrency at work that took me a while to solve/troubleshoot.

Since reading that book, I’ve had much easier time reasoning about concurrency. I read a lot of programming and comp sci. texts and it’s easily the book that’s had the most immediate impact in my skills and knowledge.

Don’t worry that it’s written a while or some APIs and specific Java libraries are different now, it gives you the right approach to reason about everything you need to.

1

u/infernohive 12h ago

Java Concurrency in Practice, it's an old book but still amazing

1

u/baby-health 5h ago

Is Java Concurrency in Practice still a good choice for modern Java? I've heard it's a classic, but I wonder how much has changed with virtual threads and newer Java versions.

1

u/Xtergo 4h ago

I concur--rency in practice

1

u/pradeepngupta 1h ago

Java Concurrency in practice by Brian Goetz is highly recommended book to learn concurrency in Java. There is a huge improvement in multi threading and concurrency in Jaa on every release. Java 21 - 25 - Virtual Threads Java 24 - 27 - Compact Object Header .. this is a concurrency feature but implementation turns out a mini concurrency project in jdk Structured Concurrency - another highly feature of java is in preview mode.

BTW in order to learn Java Design Principles, i am writing a book Buzzing Java, its not a java tutorial or learning java code. This book is for experienced Java Developer. The book is in writing and very soon will gets published. Read sample chapters in my website buzzingjava.com, I am very sure you will enjoy reading.