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

Many Java programmers feel that classes should be extended
only when they are enhanced or modified in some way.So,if
you will not be overriding any of Thread's other methods,it
is probably best simply to implement Runnable.

Is This Answer Correct ?    32 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What package is math in java?

993


Is ++ operator is thread safe in java?

949


What is the advantage of functional interface in java 8?

986


Is java free for commercial?

920


What are constants?

1049


Is hashset ordered?

1062


What is the difference between reader/writer and inputstream/output stream?

1071


Differentiate between a constructor and a method? Can we mark constructors final?

1188


How do you declare an array that will hold more than 64KB of data?

1281


I have multiple constructors defined in a class. Is it possible to call a constructor from another constructor’s body?

1010


What is difference between array and vector?

1082


Can we override data members in java?

1136


What is array sorting in java?

1051


Is multiple inheritance supported by java?

985


What is indexof in java?

995