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

why Runnable interface is preferable than extending the
Thread class?

Answer Posted / myluvdeepu

if we extend thread then we can't extend other class.
but if we implement runnable interface we can implement as much interface as we can, there is no restriction.

thread call the run method automatically(if called with no-arg).but for runnable we need to call run method.
thread cause problem in multiple inheritance.
but runnable interface don't.

Is This Answer Correct ?    4 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

If an object reference is set to null, will the garbage collector immediately free the memory held by that object?

1099


What is the history of java?

947


What is parse method?

966


Define canvas?

927


When should I use a singleton?

992


What is a method in programming?

1143


What do you know about java?

903


Can we override the static methods?

993


What is the file extension for java?

1034


Why lambda expression is used in java?

1007


Can the interface be final?

976


How can you add and remove nodes in jtree?

988


What is the concept of multithreading?

940


What are the advantages of defining packages in java?

939


What are access specifiers available in java?

984