20.20
java.lang.Thread
THE PACKAGE JAVA.LANG
20.20.5
public Thread(String name)
This constructor initializes a newly created
Thread
object so that it has no sepa
rate run object, has the specified
name
as its name, and belongs to the same thread
group as the thread that is creating the new thread.
This constructor has exactly the same effect as the explicit constructor call
this(null, null, name)
( 20.20.10).
20.20.6
public Thread(Runnable runObject)
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 same thread group as the thread that is creating the new thread.
This constructor has exactly the same effect as the explicit constructor call
this(null, runObject, gname)
( 20.20.10) where
gname
is a newly generated
name. Automatically generated names are of the form
"Thread "+n
where
n
is
an integer.
20.20.7
public Thread(Runnable runObject, String name)
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 same thread group as the thread that is creating the new thread.
This constructor has exactly the same effect as the explicit constructor call
this(null, runObject, name)
( 20.20.10).
20.20.8
public Thread(ThreadGroup group, 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 constructor initializes a newly created
Thread
object so that it has no
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.
This constructor has exactly the same effect as the explicit constructor call
Thread(group, null, name)
( 20.20.10).
592
footer
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