Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 are inbuilt functions?

934


Mention some interfaces implemented by linked list in java.

973


Can a lock be acquired on a class in java programming?

923


What is append function?

941


do I need to use synchronized on setvalue(int)? : Java thread

957


Does the order of public and static declaration matter in main method?

1028


What is the difference between compare and compareto in java?

945


What is the difference between Array and Hash Table?

980


When should I use singleton pattern?

978


Difference between string s= new string (); and string s = "abv";?

1157


How can you read an integer value from the keyword when the application is runtime in java? example?

1059


What are the features in java?

1017


What are new features introduced with java 8 ?

932


What do you mean by of string::valueof expression in java 8?

902


Write a factorial program using recursion in java?

944