0

Possible Duplicate:
Java: “implements Runnable” vs. “extends Thread”

Why do we have two ways to create a thread in java - extending the thread class or implementing the runnable interface ? Is there any obvious benefit of choosing one over the other? When would you use subclassing the thread class ?

Community
  • 1
  • 1
phoenix
  • 3,531
  • 9
  • 30
  • 31
  • Welcome to Stack Overflow! Please use the search before asking a new question. Many things have already been asked and answered on SO, and you may find your answer instantly. – Brian Roach Apr 24 '11 at 18:15
  • 1
    For starters, `Thread` itself implements `Runnable`, but not every `Runnable` is a `Thread`. – BoltClock Apr 24 '11 at 18:16

0 Answers0