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

What does n mean in java?

1020


Give an example of call be reference significance.

1081


How many bits is a string?

1061


How do you escape sequences in java?

1114


What is meant by flickering?

1133


Explain the public class modifier?

996


How do you do a line break in java?

1082


Explain access modifiers in java.

1105


What a static class can contains?

1198


Explain about doubly linked list

1094


What are decalarations?

1180


What is string builder?

949


Which way a developer should use for creating thread, i.e. Sub classing thread or implementing runnable.

988


Explain the use of shift operator in java. Can you give some examples?

1037


How do you check if an arraylist is not empty?

1188