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
Is null function in java?
Can we convert stringbuffer to string?
What is pojo class in java?
How would you dynamically allocate memory to an array?
What is the use of put method?
What does main method?
Why string is called as immutable?
Why object class is super class for every class in java?
Tell me about your ability to work under pressure
What are generic methods?
What is instance means in java?
What is the difference between post and put?
What is Mutex (Mutual Exclusion Object) ?
What is the difference between size and length in java?
Explain the concept of hashtables?