This week's book giveaway is in the Open Source forum.
We're giving away four copies of RabbitMQ in Depth and have Gavin Roy on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes multithreading  and concurrency Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of RabbitMQ in Depth this week in the Open Source forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "multithreading  and concurrency" Watch "multithreading  and concurrency" New topic

multithreading and concurrency

Pankaj Shet
Ranch Hand

Joined: Sep 08, 2006
Posts: 286

I am Pankaj Shet.
I want to know the difference between multithreading and concurrency.
Where can I apply them?
Thank You

B.Sc.(I.T.), S.C.J.P., S.C.W.C.D., PGDAC(CDAC)
Matt Russell
Ranch Hand

Joined: Aug 15, 2006
Posts: 165
Hi Pankaj,

Threads are a specific example of concurrency.

"Concurrency occurs when two or more execution flows are able to run simultaneously."

Threads are a way for programs to do several different tasks at the same time -- that is, concurrently. (They're not the only mechanism; another is to use several "processes").

The following is a good page to read to understand situations where you could apply multithreading:

Inquisition: open-source mock exam simulator for SCJP and SCWCD
wood burning stoves
subject: multithreading and concurrency