*
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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()
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Threads
 
Similar Threads
Thread Question: Are they all "under" creator?
Thread Help Wanted
For those of you who are certified ......
thread safe for SecureRandom.nextBytes()?
To which of the following can we apply the synchronized keyword