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 bufferedreader in java?

1047


Can we have any code between try and finally blocks?

1021


What is boolean strategy?

1134


Name the components that are termed to be Heavy-weight component but available in Light-weight components?

2491


Can I uninstall java?

1052


What is scope & storage allocation of global and extern variables? Explain with an example

1042


How will you reverse a link list without using recursion?

1033


What is a singleton in genetics?

1070


How do you invoke a method?

1004


What is a 16 bit word?

1001


What are the differences between path and classpath variables?

1042


What is int lol?

1141


What is the collections api?

1055


What is difference between overloading and overriding in java?

1027


What is a class in java?

1012