• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Thread Const -- JQuest

 
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Thread t = new Thread(new RunHandler())
a. RunHandler must implement Runnable
b. RunHandler must extend Thread.
c. either a or b
d. both a and b
I chose a. I checked out the api doc too. But it says c. Which is correct.
------------------
Regards,
Shree
 
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Answer should be a
 
shree vijay
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think c is fine. Yes, the constructor for thread only takes
runnable. But class Thread also implements runnable interface.
So, c could be the answer.

Originally posted by shree vijay:
Hi,
Thread t = new Thread(new RunHandler())
a. RunHandler must implement Runnable
b. RunHandler must extend Thread.
c. either a or b
d. both a and b
I chose a. I checked out the api doc too. But it says c. Which is correct.


 
God is a comedian playing for an audience that is afraid to laugh - Voltair. tiny ad:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic