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 ?
Answer Posted / adminraj
Check executing/running current thread by
currentThread() [Method]
public static Thread currentThread()
Find the currently executing thread.
Returns:
the currently executing thread
| Is This Answer Correct ? | 9 Yes | 0 No |
Post New Answer View All Answers
Explain static nested classes ?
What are the 6 functions?
What is method overloading with type promotion?
Why lambda expression is used in java?
What are the four pillars of java?
What if the main() method is declared as private? What happens when the static modifier is removed from the signature of the main() method?
What are java packages? What's the significance of packages?
How large is a boolean?
How do you create an array in java?
How can we create a synchronized collection from given collection?
Does set allows null in java?
What is a arraylist in java?
What are the practical benefits, if any, of importing a specific class rather than an entire package (e.g. Import java.net.* Versus import java.net.socket)?
Why is it important to initialize a variable?
What is the formula to calculate percentage?