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
What is the default value of an object reference declared as an instance variable?
What's the purpose of static methods and static variables?
what is the messsage u r going to get from an objectoriented programing?
How to print an arraylist in java?
Is overriding possible in java?
Which number is denoted by leading zero in java?
Should database connections be singleton?
Explain different states of a thread in java?
How can we find the actual size of an object on the heap?
What is thread pool in java with example?
Is static a singleton?
What access modifiers can be used for variables?
We are seeing so many videos/audios as many web sited. But question is these videos or audios are stored in Databases ( Oracle, Mysql, Sybase,... ) or stored any file directory from there they will give the link for that? Pls explain and give sample code to achieve this one? Thanks, Seenu.
What is string args [] in java?
What is palindrome in java?