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

Why is java so important?

1159


What do you mean by ordered and sorted in collections in java?

1043


State the difference between strings and arrays.

1323


Can variables be used in java without initialization?

1126


What is the tradeoff between using an unordered array versus an ordered array?

1293


What's the access scope of protected access specifier?

1098


What is a prefix function.write down a code to compute prefix function.

1109


What is the difference between Java1.4 and Java1.5

2392


What is difference between path and classpath in java?

1092


what is the use of pojo (plain old java objects)? how it is interact with crystal reports? pls urgent

2240


Explain about serializable interface in java?

1051


What is time complexity java?

1045


5 Coding best practices you learned in java?

1062


Why does java have two ways to create child threads? Which way is better?

1110


What is off heap memory?

1069