File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Threads Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Threads" Watch "Threads" New topic
Author

Threads

shruti patel
Ranch Hand

Joined: Mar 10, 2008
Posts: 52
If a multi threaded Java program has started numerous number
of threads, at any point in time how to know which thread is
currently executing/running ?
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

Thread.currentThread()
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Threads