Hi Ransika,
Here point is, when you call wait(), notify() or notifyAll() methods from ourside of syncronized methods/blocks, compiler will throw IllegalMonitorStateException, and this exception is subclass of Exception and not checked exception.Hence,
1. When you call these methods outside the synchronized block/method, you are not getting the compile time error(Bec, IllegalMonitorStateException is not checked exception).
2. IllegalMonitorStateException is not subclass of InterruptedException, so you can't catch IllegalMonitorStateException with catch(InterruptedException) method.
3. When you use, catch(Exception e), you can very well catch the exception, IllegalMonitorStateException and can proceede with normal execution.
Hope it calrifies your doubts,
Thanks.