Originally posted by Saurabh Patil:
The over ridden method can
- Declare a narrower exception
- Declare the same exception
- Declare no exception at all!
- throw any..just any kind of Run Time Exceptions.
Apart from these 4 points if there is anything else it does, the compilation will fail!
In this case compilation will succeed although OutOfMemoryError is not a RuntimeException......
It can throw any type of
Unchecked Exception [ September 06, 2008: Message edited by: Ankit Garg ]