Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Extending Thread over Implementing Runnable

 
Udaya Wijenayake
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What are the advantages of extending thread class over implementing runnable interface? If there are no advantages then why there is a thread class?
 
Shanky Sohar
Ranch Hand
Posts: 1051
Eclipse IDE Firefox Browser
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
both are same as thread class itself implements the runnable interface.
you can choose any one from them.but extending a class will always consider a bad programming practice
 
Lester Burnham
Rancher
Posts: 1337
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See ExtendingThreadVsImplementingRunnable
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic