This week's giveaway is in the Threads forum.
We're giving away four copies of Java Concurrency Live Lessons and have Doug Schmidt on-line!
See this thread for details.
Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Simple thread question  RSS feed

 
Jeff Paul
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could somebody please explain to me the difference between 'extends Thread' and 'implements Runnable', and when I should use either one? Thanks.
 
Jeff Paul
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Whoops, I think I'm in the wrong forum. I just noticed that there is one especially for threads. Mods, move me on over if you wish, and sorry about that.
[ March 04, 2005: Message edited by: Jeff Paul ]
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, I will move you to the Threads and Synchronization forum.

But first let me tell you that I just created an entry in our FAQ: http://faq.javaranch.com/view?ExtendingThreadVsImplementingRunnable

Searching in the above mentioned forum should also give you many more hits, as it's a *really* *very* frequently asked question.
 
Jeff Paul
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, that answered my question perfectly.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!