• 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
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Thread Question

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have this question:
Which methods may cause a thread to stop executing?

sleep();
stop();
yield();
wait();
notify();
I chose sleep(), yield() and wait().
While answer includes stop().
Stop() is deprecated, and my question is:
do deprecated methods still need to be considered in SCJP 1.4?
Thanks
Karen
 
Author
Posts: 836
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As far as I can remember from my preparation from the exam, deprecated methods aren't tested - so you only really need to know about wait(), notify(), notifyAll(), sleep(), yield(), join() and run() as well as the Thread constructors.
Of course, a little bit of extra knowledge about Java's history can't hurt; besides, it sounds like you've already covered enough about stop() to know what it does and where it might be used (or misused!) anyway.
Please correct me if I'm wrong or if I've missed any required methods out...
reply
    Bookmark Topic Watch Topic
  • New Topic