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 are data structures in java?

1030


How can you avoid serialization in child class if the base class is implementing the serializable interface?

1131


What methods are used to get and set the text label displayed by a button object?

1069


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

1080


How garbage collection is done in java?

1104


What is a condition in programming?

1053


Write a java program that prints all the values given at command-line.

1057


What is arraylist e?

1147


Can a constructor be protected?

1131


Explain the difference between abstract classes and interfaces in java?

1266


What is the main function in java?

1110


How can we make string upper case or lower case?

1140


What do you mean by Function Overloading in java?

1223


How do you format in java?

1043


What are parsing rules?

1046