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
Explain about abstract classes in java?
What is the difference between hashset and treeset in java?
What is the relationship between class and object?
How many bytes is a char in java?
What is the difference between preemptive scheduling and time slicing in java programming?
What is the difference between heap memory and stack memory?
What is final modifier?
What’s a deadlock?
How big is a gigabyte?
How are the elements of a gridbaglayout organized in java programming?
explain the difference between jdk and jvm?
What are the benefits of operations?
What is anti pattern in programming?
What is java oops?
What is java reflection?