File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 Java Interview Guide this week in the Jobs Discussion 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: 289

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
I agree. Here's the link:
subject: multithreading and concurrency
jQuery in Action, 3rd edition