What is the 2 way of creating a thread ? Which is the best way and why

Showing Answers 1 - 1 of 1 Answers

reena sahoo

  • Sep 1st, 2005
 

1. Extending the Thread class. 
2. implementing the Runnable interface. 
 
and implementing the Runnable interface is best way as in Extending Thread class u cannot extend any other class. but in Implementing Runnable interface u can extend any class u need.

  Was this answer useful?  Yes

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