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 is the file extension for java?

1059


When will we prefer to use set and list in java and why?

948


What is threaded programming and when is it used? : Java thread

1052


What is definition and declaration?

998


What restrictions are placed on method overriding?

1157


What is string english?

995


What is unicode in java?

919


What is multi level inheritance in java?

1007


What is visibility mode?

947


Explain the features of interfaces in java?

959


What is member in java?

992


What is autoboxing and unboxing?

986


What is the private method modifier?

1074


Tell me a few examples of final classes defined in Java API?

1079


Difference between throw and throws?

1088