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
how does the run() method in runnable work? : Java thread
What is a flag variable?
Tell me the Importent classes in net package?
What is regex in java?
What is the difference between == and === javascript?
Can a static block throw exception?
What do you mean by compiler?
what is the constructor and how many types of constructors are used in java?
What is backdrop?
What is runtime polymorphism or dynamic method dispatch?
Can you call one constructor from another if a class has multiple constructors?
Why char array is favored over string for the storage of passwords?
What do you mean by an object in java?
What does it mean that a method or field is “static”?
What are parameters in a method?