First of all, you can't use "implements Thread". Thread is a class - if you want to inherit from it you use "extends". You may be getting it confused with Runnable, which is an interface.

Secondly, to answer your question: you don't. If you've created a Thread, or anything that inherits from Thread, you can just start it. If you've created a Runnable object, you have to pass that to a Thread. Since Thread implements Runnable, that means you can pass a Thread to another Thread - but just because you can doesn't mean you should.

isha krishnan
Ranch Hand

Joined: Nov 10, 2008
Posts: 50

posted Apr 07, 2011 19:36:16

0

Hi ,

Yeah ,have mistaken Runnable with Thread..

I created an instance of Class MyThread which Implements Runnable.
have written implementation in run().
Now if i want to start this thread, i can't because Runnable interface has only one method RUN().So to bring other methods of start and stopping a thread, i need to pass this object to Thread Class.