• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

method signatures.

 
Vishy Karl
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
The following Q appears in javacertificate.
Which of the following statements are true? [Check all correct answers]

1 The notify() method is a static method of the Thread class
2 The notify() method wakes up a single thread that is waiting for the object's monitor.
3 The notify method is overridden in the Thread class.
4 The notify method throws an IllegalMonitorStateException

The answer is 2,4.
Now my Question is about option 4. How can I know which method throws what exception ? I searched the JLS but could not find it.
Are we supposed to remember all the method signatures(including the exceptions they can throw ?) If yes then where can I find it ?
(By the way the K & B bk defines the notify method as only.
public final void notify()
Plz. clarify regarding this. Thanks in advance.................
C ya,
 
Vicken Karaoghlanian
Ranch Hand
Posts: 522
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try the Java API doc here
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic