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

How to do a true java ping from windows?

1235


How do you take thread dump in java?

1053


What are the 4 versions of java?

1221


Is null false in java?

1229


What is the use of :: in java?

1074


What is bool mean?

1138


What is derived datatype?

1264


Can constructor return value?

1010


What is singleton math?

1215


What does jenkins do?

967


What happens if we don’t define serial version uid?

1078


Explain differences between collection api and stream api?

1230


Can you sort a list in java?

1026


What is the purpose of using javap?

1154


What is hashmap and map?

1068