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 does isempty () do in java?
Define locale.
Can you create an object of an abstract class?
Does windows 10 need java?
Which one will take more memory: an int or integer?
What is the function of log?
Can a lock be acquired on a class in java programming?
What is difference between identifier and variable?
Is oracle charging for java?
Differece between class and generic class?
what is collatration?
Why java is platform independent? Explain.
What is Recursion Function?
What are the types of exceptions?
How does callback work in java?