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 / adminraj
Check executing/running current thread by
currentThread() [Method]
public static Thread currentThread()
Find the currently executing thread.
Returns:
the currently executing thread
| Is This Answer Correct ? | 9 Yes | 0 No |
Post New Answer View All Answers
What are inbuilt functions?
Mention some interfaces implemented by linked list in java.
Can a lock be acquired on a class in java programming?
What is append function?
do I need to use synchronized on setvalue(int)? : Java thread
Does the order of public and static declaration matter in main method?
What is the difference between compare and compareto in java?
What is the difference between Array and Hash Table?
When should I use singleton pattern?
Difference between string s= new string (); and string s = "abv";?
How can you read an integer value from the keyword when the application is runtime in java? example?
What are the features in java?
What are new features introduced with java 8 ?
What do you mean by of string::valueof expression in java 8?
Write a factorial program using recursion in java?