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
Explain the difference between abstract classes and interfaces in java?
What are the 6 mandatory procedures for iso 9001?
What are the advantages of packages in java?
What is wrapper class html?
In multi-threading how can we ensure that a resource isn't used by multiple threads simultaneously?
What is the use of arraylist class in java?
What is ++ a in java?
What is data type example?
Explain different forms of polymorphism?
What is byte data type?
What is module in project?
Which command from the jdk compiles a java program?
What is the use of StringTokenizer class?
How do I convert a string to an int in java?
What is a control variable example?