File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes MyThread , Runnable Classes Which is Advantageous ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "MyThread , Runnable Classes Which is Advantageous ?" Watch "MyThread , Runnable Classes Which is Advantageous ?" New topic
Author

MyThread , Runnable Classes Which is Advantageous ?

Jesu Mani
Ranch Hand

Joined: Oct 16, 2006
Posts: 34
List me the difference in the MyThread and the Runnable Classes and Which is advantageous?

A.Masilamani
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9345
    
    2

Hi Above,

Both are the same but preferably, go for the Runnable bcos even after implementing Runnable, you still have the chance to extend your class.

Regards,
Jothi Shankar Kumar. S


SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
JagadishBabu Penjuru
Greenhorn

Joined: Oct 08, 2006
Posts: 3
in usage both are same ..but Runnable interface using is better than that of extending class...
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
Originally posted by Masilamani Antony:
List me the difference in the MyThread and the Runnable Classes and Which is advantageous?

A.Masilamani


What do you mean "MyThread"? What do you mean "Runnable Class"? Runnable is an interface not a class.


[ October 18, 2006: Message edited by: Barry Gaunt ]

Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
Please post your questions in our Java In General (Beginner) forum... moving there.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: MyThread , Runnable Classes Which is Advantageous ?
 
Similar Threads
Thread, Runnable and their run() method
Thread query
About Thread
Thread Question
why run() method in Runnable interface is not called ?