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 / praveen gupta

The main reason to implement Runnable interface is that you know that java does not supporting multiple inheritance
through classes .if u extend Thread class,u can't extend any
class which you required other than thread class.if u are
implementing runnable interface u can extend any class which
you required other than thread class.this is main advantage of
implementing java.lang.Runnable interface.

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is static import in java? Explain

967


What is a newline character in java?

995


What is an i/o filter?

1688


What is java algorithm?

888


What is console based application in java?

995


Explain differences between collection api and stream api?

1096


What is regex used for?

954


what is the purpose of "virtual"?

1025


Can a function return a function?

997


how we can create packages in java?

920


What do you know about the garbage collector?

1052


Can we have any code between try and finally blocks?

973


Can a class have 2 constructors?

853


What is final?

1013


What is this keyword used for?

1075