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

What are jee technologies?

960


What are different exception types exceptions available in java ?

949


What is the difference between member variables initialization and assignment in a constructor?

1174


What is the equal sign?

1029


What is an class?

964


What is meant by oops concept in java?

930


What is the difference between this() and super() in java?

983


Is java platform independent?

922


Tell us something about different types of casting?

865


Can we change the scope of the overridden method in the subclass?

1313


Using callable statement how can you pass out parameters, explain with example?

1164


What do you mean by JVM?

1010


Should you use singleton pattern?

897


Is minecraft 1.15 out?

922


Can we inherit inner class?

957