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

Explain static nested classes ?

1117


What are the 6 functions?

975


What is method overloading with type promotion?

1274


Why lambda expression is used in java?

1064


What are the four pillars of java?

1211


What if the main() method is declared as private? What happens when the static modifier is removed from the signature of the main() method?

1191


What are java packages? What's the significance of packages?

1331


How large is a boolean?

1014


How do you create an array in java?

996


How can we create a synchronized collection from given collection?

1085


Does set allows null in java?

961


What is a arraylist in java?

1069


What are the practical benefits, if any, of importing a specific class rather than an entire package (e.g. Import java.net.* Versus import java.net.socket)?

1114


Why is it important to initialize a variable?

994


What is the formula to calculate percentage?

1018