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...

Hi Friends, can you give difference between extending thread
class and implementing runnable interface.

Answer Posted / nagendra kumar

1.extends Thread and implements Runnable both are
fuctionally same.
2.If we use "extends Thread" then there is no scope to
extend another class because java doesn't multiple
inheritance.
3.If we use "implements Runnable" then there is a scope to
extend another class.This definately advantage why because
a programmer wants to extends a class and also use Thread
class features they must use Runnable interface.

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between the reader/writer class hierarchy and the inputstream/outputstream class hierarchy in java programming?

1102


What is the different between get and post?

953


Explain wrapper classes in java?

973


What is return code?

996


What is java regex?

986


Lowest Common ancestor in a Binary Search Tree and Binary Tree.

917


What is the purpose of an interface?

1028


What are different types of states exist for a thread?

998


what is optional in java 8?

1041


How does linkedlist work in java?

904


Is it necessary for the port addresses to be unique? Explain with reason.

1008


What is toarray method in java?

1078


How is java hashmap implemented?

1005


How can a gui component handle its own events in java programming?

1026


Is void a wrapper class?

933