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

Explain about abstract classes in java?

1088


What is the difference between hashset and treeset in java?

1106


What is the relationship between class and object?

1091


How many bytes is a char in java?

1057


What is the difference between preemptive scheduling and time slicing in java programming?

1065


What is the difference between heap memory and stack memory?

1118


What is final modifier?

1134


What’s a deadlock?

1146


How big is a gigabyte?

1103


How are the elements of a gridbaglayout organized in java programming?

1025


explain the difference between jdk and jvm?

1041


What are the benefits of operations?

993


What is anti pattern in programming?

1011


What is java oops?

1160


What is java reflection?

1027