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 / srinu

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 ?    6 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can java program run without jre?

1012


Can we cast any other type to boolean type with type casting?

959


Why vector class is used?

992


Is arraylist dynamic in java?

993


Is singleton class immutable?

967


What is java lang string?

986


Can a constructor call another constructor?

983


What does += mean coding?

935


What state is a thread in when it is executing?

963


Explain how to force the garbage collection in java.

968


What is generic class?

1094


What is meant by anonymous class?

1025


What is the default size of set in java?

967


What are different types of states exist for a thread?

1009


If an object is garbage collected, can it become reachable again?

1000