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,