This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Threads and Synchronization and the fly likes Thread Concept Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "Thread Concept " Watch "Thread Concept " New topic

Thread Concept

Ram Adsumalli
Ranch Hand

Joined: Oct 16, 2006
Posts: 64
HI Guys,

I am little bit confused with the thread concept. What does the thread mean in Java. Can any one help me out to understand the Single thread and Multi threading Concepts. If Possible point me out to Tutorial.

Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24195

Concepts? A single threaded program executes one stream of instructions, one at a time. A multithreaded program seems to (or in the case of a multiprocessor machine, actually does) execute multiple streams of instructions at the same time. That's about it.

There are special APIs to let threads communicate with one another, and for threads to coordinate their activities so that data they share doesn't get corrupted. But there are just details. See here to start learning them.

[Jess in Action][AskingGoodQuestions]
It is sorta covered in the JavaRanch Style Guide.
subject: Thread Concept
jQuery in Action, 3rd edition