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 / adminraj

Check executing/running current thread by

currentThread() [Method]

public static Thread currentThread()

Find the currently executing thread.

Returns:

the currently executing thread

Is This Answer Correct ?    9 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What do you understand by the bean persistent property?

547


What is the use of default method in interface in java?

543


What 5 doubled?

501


What is finally and finalize in java?

585


Why is a singleton bad?

549






What is predicate in java?

553


Can list have duplicates in java?

518


Can we override data members in java?

616


What is the driver class?

561


What is constructor chaining and how is it achieved in java?

564


Explain methods specific to list interface?

547


What is the finalize method do?

592


Is logger a singleton?

513


What is canonical name in java?

612


What are the differences between include directive and include action?

534