Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Help Java T Java Thread

Related Tutorials


 
 

Share on Google+Share on Google+

Java Thread

Advertisement
A java thread is an execution context or a lightweight process.

Java Thread

     

A java thread is an execution context or a lightweight process. It is a single sequential flow of control within a program. Programmer may use java thread mechanism to execute multiple tasks at the same time. In Java Programming language, thread is a sequential path of code execution within a program. Each thread has its own local variables, program counter and lifetime. In single threaded runtime environment, operations are executes sequentially i.e. next operation can execute only when the previous one is complete. It exists in a common memory space and can share both data and code of a program. Threading concept is very important in Java through which we can increase the speed of any application.

In Java, every thread begins by executing a run() method in a particular object. Run() is declared to be public, takes no arguments, has no return value, and is not allowed to throw any exceptions. Any class can implement a run() method by declaring that the class implements the Runnable interface.

 

Read more at:

http:/www.roseindia.net/java/thread/index.shtml


Advertisements

If you enjoyed this post then why not add us on Google+? Add us to your Circles



Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: December 18, 2008

Related Tutorials

Discuss: Java Thread   View All Comments

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments:0
DMCA.com