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 / ss
currentThread() method is static method, so don't need to
create the thread object to call the method..
Below is the correct way ..
Thread t=Thread.currentThread();
System.out.println(t.getName());
Is This Answer Correct ? | 13 Yes | 0 No |
Post New Answer View All Answers
Can inner class have constructor?
does java support pointers?
Difference between java and javascript
Hi Anyone know the model / questions of the Federal bank sample questions for the post of Specialist Officers - Programmers. Please post if anyone have..
Which is better stringbuilder or stringbuffer?
What is java oops?
What does %4d mean in java?
Lowest Common ancestor in a Binary Search Tree and Binary Tree.
What is the difference between abstract classes and interfaces?
Can inner class be public in java?
What is a method in java?
what is collatration?
What are design patterns and please explain?
Is final static java?
What is difference between equal and == in java?