which one is more advantageous?
Hi! There are 2 ways to create the Thread.one is by extending the Thread method and other by implementing the Runnable interface.which one will be more advantageous.what is the reason?.Thanks,
[213 byte] By [
sasi150] at [2007-9-30 18:31:03]

From an OO (object-oriented) perspective, you should only extend Thread when you are actually creating a subclass of Thread, i.e. when you need a special kind of Thread. Extending Thread also prevents you from extending anything else, which is probably not what you want either.
If you just want to run something on a separate thread, implement the Runnable interface.
Totally agree.Go through the Thread API, you'll find that Thread itself implements Runnable.Java allows you to extend only one class at a time, but you can implement more than one.kapilChhabra