• Post Reply Bookmark Topic Watch Topic
  • New Topic

extends thread as well as implements Runnable  RSS feed

 
manish ahuja
Ranch Hand
Posts: 312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All
This is an interview question . What will happen if i have a class that extends to Thread as well as implements Runnable
Rgrds
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24215
37
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Every class that extends Thread implements Runnable, because Thread itself implements Runnable -- check the API docs.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!