aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes why this?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "why this??" Watch "why this??" New topic
Author

why this??

asp3000
Greenhorn

Joined: Jun 01, 2001
Posts: 3
Which of the following statements are true. Select all correct answers.
A The wait method defined in the Thread class, can be used to convert a thread from Running state to Waiting state.
B The wait(), notify(), and notifyAll() methods must be executed in synchronized code.
C The notify() and notifyAll() methods can be used to signal and move waiting threads to ready-to-run state.
D The Thread class is an abstract class.
The answer is b c , but I think A is also correct!
Samith Nambiar
Ranch Hand

Joined: Mar 14, 2001
Posts: 147
the wait() method does make a thread in a Running state to become Not Runnable ... but note that the option says

The wait method defined in the Thread class

i guess the option is false because the wait() method is part of the class Object and only inherited in the Thread class
hope that helps
Samith.P.Nambiar
<pre>
\```/
(o o) harder u try luckier u get
-------oOO--(_)--OOo----------------------------
</pre>
asp3000
Greenhorn

Joined: Jun 01, 2001
Posts: 3
thanks
Bin Wang
Ranch Hand

Joined: May 01, 2001
Posts: 82
Why C is correct? I think it's wrong.
C The notify() and notifyAll() methods can be used to signal and move waiting threads to ready-to-run state.
notify() and notifyAll() methods can signal and move waiting threads to seeking lock state, but not ready-to-run state.
Haining Mu
Ranch Hand

Joined: Jun 01, 2001
Posts: 51
Originally posted by Bin Wang:
notify() and notifyAll() methods can signal and move waiting threads to seeking lock state, but not ready-to-run state.[/B]

I think the words "can be used" is important, it didn't use "will signal and move..."
shailesh sonavadekar
Ranch Hand

Joined: Oct 12, 2000
Posts: 1874
asp3000 , Welcome to javaranch.
PROPER NAMES ARE NOW REQUIRED
Please look carefully at official naming policy at javaranch & reregister yourself with proper first & last name. Please adhere to official naming policy & help maintain the decorum of the forum.
Waiting for your posts with proper first & last name. Once you have reregister , please let us know about that & then your previous account will be disabled.
Regards.

Your Friendly Bartender
Shailesh.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: why this??