Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

stop method

 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all!
Marcus Greens mock ( http://www.jchq.net/mockexams/exam2.htm ) has following question:
---
Question 22)
What can cause a thread to stop executing?
1) The program exits via a call to System.exit(0);
2) Another thread is given a higher priority
3) A call to the thread's stop method.
4) A call to the halt method of the Thread class
---
Is it really necessary to display the option 3 since that method is deprecated?
------------------
Antti Barck
It Solutions Consultant, NSD Oy
 
Ranch Hand
Posts: 201
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think, option 3 is given to confuse candidate and test it's knowledge(that's what exams are for!)
And one shd not choose that option.Am I rite?
Thanx
 
Ranch Hand
Posts: 153
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
May be we guess that SUN won't ask such questions in the real exam.
In my opinion, the mock exams were written even before JDK 1.2.2 has come in to force and hence such questions may be there. Better answer or ignore.
HTH
tvs sundaram.
 
Ranch Hand
Posts: 267
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You have to remember so that you don't get confused int eh exam that Stop , Resume & Suspend are deprecated methods.

Originally posted by Antti Barck:
Hi all!
Marcus Greens mock ( http://www.jchq.net/mockexams/exam2.htm ) has following question:
---
Question 22)
What can cause a thread to stop executing?
1) The program exits via a call to System.exit(0);
2) Another thread is given a higher priority
3) A call to the thread's stop method.
4) A call to the halt method of the Thread class
---
Is it really necessary to display the option 3 since that method is deprecated?


 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Swati!
Option 3 IS a right answer, but that was not what I was pondering about.
------------------
Antti Barck
It Solutions Consultant, NSD Oy
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Roopa!
I think that questions concerning deprecated functions might be formed in another context than in this one.
------------------
Antti Barck
It Solutions Consultant, NSD Oy
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Sundram!
I think that you are right
But, unfortunately, mocks are over for me (effectively, that is). I try the odds with the real beast tomorrow 9:00 AM (GMT+2)
------------------
Antti Barck
It Solutions Consultant, NSD Oy
 
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The real exam will not ask you to choose among deprecated methods. stop() will stop a thread even though it is deprecated.
 
arch rival
Posts: 2813
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I was under the impression that at one time (possibly before the last revision of the exam database), deprecated methods could come up in the exam. This may no longer be true, and I think I should err on the side of assuming it is true (ie I should not be mentioning them in my exam).. Thanks for antti for drawing my attention to this thread.
The usual confusion about this question is the use of the word can instead of will. A subtle but important difference.

Marcus
------------------
http://www.jchq.net Mock Exams, FAQ, Tutorial, Links, Book reviews
=================================================
Almost as good as JavaRanch
=================================================
[This message has been edited by Marcus Green (edited July 31, 2001).]
 
Thomas Paul
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
According to RHE (and they wrote the test) "the stop() method is therefore no longer part of the Certification exam." (page 216)
------------------
Tom - SCJP --- Co-Moderator of the Programmer Certification Forums
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, my only study source has been RHE eTrainer
------------------
Antti Barck
It Solutions Consultant, NSD Oy
 
They worship nothing. They say it's because nothing is worth fighting for. Like this tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic