Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

threading concepts in java

I am intermediate in java. I am working with a company quite new to company, they have asked me to take session on "threading concepts in java with real example" as I don't have hands on on threading I can just prepare slides hoe threads can be implemented using Thread class or Runnable interface.

Can anybody please help me out with real scenario of threads and its implementation? Thanks in advance

like image 526
giri Avatar asked Jul 24 '26 12:07

giri


1 Answers

I would recommend Brien Goetz' "Java Concurrency In Practice". It talks about features added to the JDK above and beyond Thread and Runnable that will make your life better.

In 2016 it's a better idea to dig into the java.util.concurrency package and JDK 8 lambdas and parallel stream. No one should be trying to write multithreaded code with raw Thread unless they know what they're doing. We've been given better abstractions - use them.

like image 103
duffymo Avatar answered Jul 27 '26 00:07

duffymo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!