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 / namita kapoor
You can check by putting following code in your program
Thread t = Thread.currentThread();
System.out.println("Current Thread: "+t);
| Is This Answer Correct ? | 36 Yes | 1 No |
Post New Answer View All Answers
Which programming language is most secure?
Explain inner classes ?
What are the 4 types of research methods?
Why volatile is used in java?
What is the purpose of the enableevents() method?
What is lambda expression in java?
Is null a string in java?
How do you write a scanner class in java?
In java, how many ways you can take input from the console?
Explain thread life cycle in java?
Does list maintain insertion order java?
What is the meaning of 3 dots in java?
How do you start a new line in java?
What do you mean by synchronized non access modifier?
How do you classify Dialog Box?