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

Can we extend immutable class?

994


Is java util list serializable?

935


What is exception in java?

1090


what is the purpose of the wait(), notify(), and notifyall() methods? : Java thread

997


Differece between class and generic class?

1047


What is difference between length and length() method in java ?

1000


What is a ternary operator in java? What is an interface?

1001


What are different types of constants?

1052


Which oo concept is achieved by using overloading and overriding?

1014


Difference between this() and super() ?

1120


Why do I need to declare the type of a variable in java?

1083


What is java abstraction with example?

1070


What is java developer skills?

985


What is the difference between ArrayList and Vector? which one is better in Java

1143


Explain java coding standards for classes or java coding conventions for classes?

1134