Help coderanch get a
new server
by contributing to the fundraiser
  • 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Deprecated thread methods

 
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
This is from JXam ver 1.81:
Which methods will stop a thread from executing?
wait()
notify()
yield()
suspend()
sleep()
wait(), yield() and sleep() are obvious. But will suspend() also be an answer? Because although it is deprecated, it will still cause the thread to stop.
Am I using an older version of Jxam?
Regards,
Kapil
 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Kapil,
Yes those methods are deprecated but if u are goign for JAVA@ certification they are Deprecated .In that case if this question comes in the exam u have to answer respectively excluding the deprecated methods.
Take care
Amit
------------------
 
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think the question does not say anything about deprecated methods.The question only asks about the methods which make a thread stop it's execution.
Remember,in the exam DO NOT draw your own conclusions unless it is really required (it is in some cases).

------------------
Udayan Naik
Sun Certified Programmer for the Java 2 Platform
 
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey, the new exam tells us how many options we have to select, so it shouldn't be too difficult to figure out if they want us to mark "suspend()" or not!!
[This message has been edited by Nandini Gangopadhyay (edited April 13, 2001).]
 
This is awkward. I've grown a second evil head. I'm going to need a machete and a tiny ad ...
We need your help - Coderanch server fundraiser
https://coderanch.com/t/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic