This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

sample question on threads

 
Randall Twede
Ranch Hand
Posts: 4353
2
Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Randall Twede
Ranch Hand
Posts: 4353
2
Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic