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
What is the memory leak in java?
What is java oops?
What is the Concept of Encapsulation in OOPS
Howto get an object that will perform date & time calculations then format it for output in some different locales with different date style.can ne1 tel me the answer of this question.pls
Explain the private field modifier?
how we can create packages in java?
what are different ways in which a thread can enter the waiting state? : Java thread
What is use of set in java?
What is an array in java?
What is type safety in java?
Write code of any action class?
Can we inherit inner class?
Can we make main() thread as daemon?
Which containers use a flowlayout as their default layout in java programming?
What is main in java?