• Post Reply Bookmark Topic Watch Topic
  • New Topic

limitation of subclassing the Thread class.

 
Arun Martin
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
i thank rahul for replying to my earlier query.
A limitation of subclassing the Thread class is that you ________.

1. must catch the ThreadDeath exception
2. must implement the Threadable interface
3. can not have any static methods in the class
4. must declare the class final
5. can not subclass any other class
i think the answer is 5. am i right?.
with warm regards,
arun.
 
Mark Herschberg
Sheriff
Posts: 6037
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, 5 is correct. You can implement the Runnable interface to achieve thread-like functionality when subclassing from other classes.
--Mark
hershey@eyeshake.com
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!