Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

activeCount()  RSS feed

 
anusom
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what does activeCount() invoked on a thread return ?
 
Rahul Mahindrakar
Ranch Hand
Posts: 1869
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to Javaranch. We follow some rules pertaining to User names. The rules are specified at here
Your User name does not follow these conventions. It is recommended that you immediately register under a name conforming to the conventions.

for an answer for your query check out this program

It should print out
2 are Number of Active threads
End of Main Thread
These two threads are the Main thread and the second thread T1, created and started in the main method. Check out what happens if you do not start the second thread.
[This message has been edited by Rahul Mahindrakar (edited April 05, 2001).]
[This message has been edited by Rahul Mahindrakar (edited April 05, 2001).]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!