THE PACKAGE JAVA.LANG
java.lang.Thread
20.20
20.20.9
public Thread(ThreadGroup group, Runnable runObject)
throws SecurityException, IllegalThreadStateException
First, if group is not
null
, the
checkAccess
 method ( 20.21.4) of that thread
group is called with no arguments.
This constructor initializes a newly created
Thread
 object so that it has the
given
runObject
 as its separate run object, has a newly generated name, and
belongs to the thread group referred to by
group
 (but if
group
 is
null
, then the
new thread will belong to the same thread group as the thread that is creating the
new thread).
If
group
 is a
ThreadGroup
 that has been destroyed by method
destroy
( 20.21.11), then an
IllegalThreadStateException
 is thrown.
This constructor has exactly the same effect as the explicit constructor call
this(group, runObject, gname)
 ( 20.20.10) where
gname
 is a newly gener 
ated name. Automatically generated names are of the form
"Thread "+n
 where
n
is an integer.
20.20.10
public Thread(ThreadGroup group, Runnable runObject,
String name)
throws SecurityException, IllegalThreadStateException
First, if group is not
null
, the
checkAccess
 method ( 20.21.4) of that thread
group is called with no arguments; this may result in a
SecurityException
being thrown.
This constructor initializes a newly created
Thread
 object so that it has the
given
runObject
 as its separate run object, has the specified
name
 as its name,
and belongs to the thread group referred to by
group
 (but if
group
 is
null
, then
the new thread will belong to the same thread group as the thread that is creating
the new thread).
If
group
 is a
ThreadGroup
 that has been destroyed by method
destroy
( 20.21.11), then an
IllegalThreadStateException
 is thrown.
The priority of the newly created thread is set equal to the priority of the creat 
ing thread that is, the currently running thread. The method
setPriority
( 20.20.23) may be used to change the priority to a new value.
The newly created thread is initially marked as being a daemon thread if and
only if the thread creating it is a daemon thread. The method
setDaemon
( 20.20.25) may be used to change whether or not a thread is a daemon.
593






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

java hosting

 

Our partners: PHP: Hypertext Preprocessor Best Web Hosting Java Web Hosting Inexpensive Web Hosting  Jsp Web Hosting

Cheapest Web Hosting Jsp Hosting Cheap Hosting

Visionwebhosting.net Business web hosting division of Web Design Plus. All rights reserved