Go Back   Site Owners Forums - Webmaster Forums > Web Programming > Programming General > Java

Notices


Reply
 
Thread Tools Rate Thread Display Modes
Old 02-27-2013, 12:55 AM   #1
saurabh mishra
Registered User
 
Join Date: Feb 2013
Posts: 2
Thread

Dear Members,
Can anyone please tell me, What is thread in Java and it's usage ?
__________________
Find
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
for business, tourism, extended work or medical treatment
saurabh mishra is offline   Reply With Quote

Old 10-09-2013, 11:24 PM   #2
amitsharma11
Registered User
 
Join Date: Sep 2013
Posts: 86
thread is a flow of control within a program. A thread is similar to the more familiar notion of a process, except that multiple threads within the same application share much of the same state--in particular, they run in the same address space. It's not unlike a golf course, which can be used by many players at the same time. Sharing the same address space means that threads share instance variables, but not local variables

A new thread is born when we create an instance of the java.lang.Thread class. The Thread object represents a real thread in the Java interpreter and serves as a handle for controlling and synchronizing its execution. With it, we can start the thread, stop the thread, or suspend it temporarily.
__________________

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.
amitsharma11 is offline   Reply With Quote
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
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Before Posting - Read First iwinweekly Making money on the web 179 03-23-2023 03:11 AM
Hello - consult on thread Ale Silva Introduction Area 12 05-14-2015 04:47 AM
PTFE Thread Seal Tape ptfetapes General Discussion 3 01-02-2014 04:36 AM
Hey everyone. As I mentioned in another thread, I have a couple adsense sites up, but aopo.mark General Discussion 4 12-26-2013 04:00 AM
Win £100 CASH @ Webmaster Serve Hafsoh Post your ad here 1 10-26-2011 02:26 AM


All times are GMT -7. The time now is 03:35 AM.


Powered by vBulletin Copyright © 2020 vBulletin Solutions, Inc.