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 define a package statement after the import statement in java?

1018


What is an interface in java?

1007


What is treeset in java?

941


Is age a discrete variable?

917


What is ide with example?

910


What 4 doubled?

925


what is nested class in java?

1099


Which collection is sorted in java?

981


What are thread local variables?

1052


Why is java called java?

981


Can you instantiate the math class?

991


Can you declare the main method as final?

956


How many JVMs can run on a single machine and what is the meaning of Just-In-Time (JIT) compiler?

1338


What is set and get methods in java?

926


What is super in java?

935