Two Laptop Bag*
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 OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "multithreading  and concurrency" Watch "multithreading  and concurrency" New topic
Author

multithreading and concurrency

Pankaj Shet
Ranch Hand

Joined: Sep 08, 2006
Posts: 261

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


PANKAJ SHET
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:
http://www.oreilly.com/catalog/jthreads2/chapter/ch01.html#41042


Matt
Inquisition: open-source mock exam simulator for SCJP and SCWCD
 
jQuery in Action, 2nd edition
 
subject: multithreading and concurrency