Thread: Thread
View Single Post
Old 02-26-2014, 12:57 AM   #3
alligatortek001
Registered User
 
Join Date: Nov 2013
Posts: 92
Quote:
Originally Posted by saurabh mishra View Post
Dear Members,
Can anyone please tell me, What is thread in Java and it's usage ?
A thread can be defined as a flow of control within a program. The notion of thread is similar to the more familiar notion of process. The difference between a thread and a process becomes clear when we think about the visualization of system resources. A process visualizes the operating system resources - a process considers that it owns all the system resources. A thread however visualizes only the program resources - a thread considers that it owns all address space of the program.
The operating system can run a lot of programs (processes) and a program can run a lot of threads.

Typically threads are used to do background work in a program. At any given time, there may be many such background threads, performing activities in parallel in an application, like requesting images, updating the screen, playing audio, and so on. But often the threads provide the only way to effectively handle a number of tasks. That is why it is important to understand and to know how to use threads in concurrent programming in Java.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
alligatortek001 is offline   Reply With Quote