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 / ankush sharma
We can check the current Thread name as
Thread t= new Thread.currentThread();
System.out.println(t.getName());
| Is This Answer Correct ? | 11 Yes | 0 No |
Post New Answer View All Answers
Can we assign null to double in java?
What is java lang object?
Why do we use variables?
Why is singleton instance static?
Does treeset use compareto?
What is parameters example?
Is null or empty java?
How do you declare an array in java?
what is method reference in java 8?
Define inheritance?
What is string subsequence method?
Why to use nested classes in java?
Define how destructors are defined in java?
Explain about serializable interface in java?
What do you mean by a JVM?