When to extend Thread Class and when to implement Runnable Interface

Showing Answers 1 - 4 of 4 Answers

Jassi

  • Sep 28th, 2006
 

Hi, i will always prefer the Runnable Interface. Reason being, if u extend to Thread class, then u cannot extend any other class from ur application. So if there is a class that can provide useful functionality to u, then u cannot extend it and use its "protected" fields.Moral of the Story - Gud Designer will "ALWAYS" use Runnable interface.

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