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 / namita kapoor

You can check by putting following code in your program

Thread t = Thread.currentThread();
System.out.println("Current Thread: "+t);

Is This Answer Correct ?    36 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which programming language is most secure?

998


Explain inner classes ?

1129


What are the 4 types of research methods?

922


Why volatile is used in java?

1071


What is the purpose of the enableevents() method?

1047


What is lambda expression in java?

1044


Is null a string in java?

1079


How do you write a scanner class in java?

1016


In java, how many ways you can take input from the console?

998


Explain thread life cycle in java?

1039


Does list maintain insertion order java?

917


What is the meaning of 3 dots in java?

1166


How do you start a new line in java?

987


What do you mean by synchronized non access modifier?

998


How do you classify Dialog Box?

1121