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

u know that java not supporting multiple inheritance.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 runnable interface.

Is This Answer Correct ?    115 Yes 13 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between variable declaration and definition?

964


What is the advantage of functional interface in java 8?

986


What is an interface in java? Explain

1177


Given a singly linked list, how will you print out its contents in the reverse order? Can you do it with consuming any extra space?

984


What is <> used for in java?

1110


What is object english?

1055


Can we clone singleton object in java?

1013


what do you mean by stream pipelining in java 8? Explain

1019


How do you convert boolean to boolean?

1150


Should you use singleton pattern?

934


Why do we need wrapper classes?

1066


How do you square a number?

1261


What is singleton class example?

1020


Why wait(),notify(),notifyAll() methods defined in Object class althought we are using in only threads.

2819


What are the drawbacks of singleton class?

996