• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

method signatures.

 
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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,
 
Ranch Hand
Posts: 522
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try the Java API doc here
reply
    Bookmark Topic Watch Topic
  • New Topic