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 have try block without catch block?
What is purpose of keyword void?
What is proper subset?
Can you create an object of an abstract class?
What do heavy weight components mean in java programming?
Why do I need to declare the type of a variable in java?
What is the purpose of static keyword in java?
Why java is considered dynamic?
How do you use find and replace?
What kind of variables can a class consist?
What is tree node in java?
Why does java does not support multiple inheritance? Explain
What are the Main functions of Java?
Can a class have more than one object?
What is constructor chaining in java?