|
|
|
1000 Java Tips ebook
|
|
 

Free "1000 Java Tips" eBook is here! It is huge collection of big and small Java
programming articles and tips. Please take your copy here.
Take your copy of free "Java Technology Screensaver"!. |
|
I am sure that in my program I create 100 new threads and when I use isAlive met
|
JavaFAQ Home » Threads

Question: I am sure that in my program I create 100 new threads and
when I use isAlive method it shows often less than 100 threads... I have not
killed even one of them!
Answer: Good, short and clear explanation I found in Java tutorial on
SUN's site:
"The API for the Thread class includes a method called isAlive. The isAlive
method returns true if the thread has been started and not stopped. If the
isAlive method returns false, you know that the thread either is a New Thread or
is Dead. If the isAlive method returns true, you know that the thread is either
Runnable or Not Runnable. You cannot differentiate between a New Thread or a
Dead thread. Nor can you differentiate between a Runnable thread and a Not
Runnable thread."
--
John.
*******************************************
Our older tips: March 22, 2001 - October 21, 2002
READ
HERE
All published and not published on the site tips read
HERE
Printer Friendly Page
Send to a Friend
..
Search here again if you need more info!
|
|
|