This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma 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

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: 24189

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