aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes sample question on threads 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 "sample question on threads" Watch "sample question on threads" New topic
Author

sample question on threads

Randall Twede
Ranch Hand

Joined: Oct 21, 2000
Posts: 4347
    
    2

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 "correct" answers are B and C
I do not understand answer B.
You do not have to call these methods.


SCJP
Visit my download page
Randall Twede
Ranch Hand

Joined: Oct 21, 2000
Posts: 4347
    
    2

oh i think i figured it out. he meant that is the only place they can be executed.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: sample question on threads