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...

how many ways to create Thread and which one is good?
runnable interface ot Thread class?

Answer Posted / srinu

Two ways of creating Thread
1)By extending java.lang.Thread class
2)By implementing java.lang.Runnable interface
Here 2"nd way is good because by using interface we can
implement multiple inheritance in our class

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of beaninfo?

989


What are the differences between graph and tree?

1072


What is casting in java programming?

980


What is method reference?

932


How will you reverse a singly-link list?

954


Does garbage collection occur in permanent generation space in jvm?

1032


Can we override singleton class?

936


What is the difference between double and float variables in java?

1092


explain the difference between jdk and jvm?

939


What is the final method?

1034


What is extension method in java?

996


Difference between == and .equals() ?

956


What is multiple inheritance? Is it supported by java?

925


how to create multithreaded program? : Java thread

902


What are the main differences between the java platform and other platforms?

1000