What are the Differences between Tread class and Runnable ?

Showing Answers 1 - 4 of 4 Answers

Neil

  • Dec 6th, 2005
 

Thread class is a class having defined methods for thread implementation & runnable is an interface where methods needs to be defined as required

  Was this answer useful?  Yes

nitin

  • Dec 16th, 2005
 

Using Thread class we cannot achieve multiple inheritance usinf Runnable interface multiple inheritance can be achieved.

  Was this answer useful?  Yes

naveen.chedella

  • Jan 2nd, 2006
 

bcoz java does not supports multiplethreading directly,runnable is better approach than threadclass.

ex:

class b{

}

class a extends b extends Thread

{//gives error

}

so better approach is

class a extends b implements Runnable

{

}

  Was this answer useful?  Yes

Munavalli matt K.S.

  • Jan 9th, 2006
 

can u explain with an example?

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions