aspose 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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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: 189

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
 
Similar Threads
thread killing from seperate thread
Where can i find the mock exam?
thread safe singleton class
How can I really stop/kill a thread?
update a JList based on an Array