Possible Duplicate:
Implementing Runnable vs. extending Thread
I am very much confused about the perfect answer in simple language for above question. In which scenario which is better and why. can anyone explain.
Possible Duplicate:
Implementing Runnable vs. extending Thread
I am very much confused about the perfect answer in simple language for above question. In which scenario which is better and why. can anyone explain.
The Executor classes talk in terms of Runnable, and for that reason alone I favour implementing the Runnable interface. You don't carry the baggage of having your code implicitly tied into a thread and frameworks can handle Runnables in whatever way they prefer.