File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Threads and Synchronization and the fly likes best way to create a thread Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "best way to create a thread" Watch "best way to create a thread" New topic
Author

best way to create a thread

prem ram
Greenhorn

Joined: May 24, 2010
Posts: 3
what is the best way to ceate a thread extending thread class or implementing runnable?
Prabhakar Reddy Bokka
Ranch Hand

Joined: Jul 26, 2005
Posts: 193

Implementing runnable is the best way since you will get a chance to extend other class.
When you are working with AWT/Swing you must have to do this using runnable.
Otherwise it doesn't make much difference.


SCJP 5, SCWCD 5
Lester Burnham
Rancher

Joined: Oct 14, 2008
Posts: 1337
See http://faq.javaranch.com/java/ExtendingThreadVsImplementingRunnable. Either Callable or Future are more functional alternatives than Runnable.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: best way to create a thread