The Life of a Thread : Thread Creation « Thread « SCJP

Home
SCJP
1.Java Source And Data Type
2.Operators
3.Modifiers
4.Type Casting
5.Statements
6.Object Oriented
7.Thread
8.Utility Classes
9.File
SCJP » Thread » Thread Creation 
7.1.3.The Life of a Thread
Thread objects have four basic states: new (ready), runnable, blocked, and dead. 

The transitions from new(readyto runnable and from runnable to dead are simple and permanent.

When a Thread exits the run method, it becomes a dead Thread. 
This may occur because of a normal return from the run method or from an exception that is not caught. 

A dead Thread cannot be restarted.
7.1.Thread Creation
7.1.1.The simplest way to define code to run in a separate thread is to
7.1.2.A summary of methods used with Threads.
7.1.3.The Life of a Thread
7.1.4.Create Thread method 1: subclass the Thread class and implement the run() method.
7.1.5.Create a Thread method 2: implements Runnable interface
7.1.6.Creating Threads: Subclassing the Thread Class
7.1.7.Creating Thread: Implementing Runnable
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.