Two Laptop Bag*
The moose likes Threads and Synchronization and the fly likes Simple thread question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "Simple thread question" Watch "Simple thread question" New topic
Author

Simple thread question

Jeff Paul
Greenhorn

Joined: Mar 03, 2005
Posts: 4
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

Joined: Mar 03, 2005
Posts: 4
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

Joined: Jul 11, 2001
Posts: 14112
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.


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Jeff Paul
Greenhorn

Joined: Mar 03, 2005
Posts: 4
Thanks, that answered my question perfectly.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Simple thread question