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

How does a for loop work?

992


Is array dynamic in java?

942


How infinite loop is declared?

1028


What does substring mean?

980


What are the methods available in a class?

1086


What is character in data type?

966


What is the difference between a window and a frame in java programming?

1144


What does the ‘static’ keyword mean? Is it possible to override private or static method in java?

993


What is included in core java?

1064


What is the relationship between class and object?

1048


Why do we declare a class static?

1165


How do I type unicode?

986


What is the use of isempty in java?

1032


What is the difference between actual and formal parameters?

948


What is the difference between import java.util.date and java .util?

1058