Originally posted by avn:
Hi,
I got a doubt in Exceptions.Why the overriding method can
throw only ArithmeticExceptions which are not thrown by
overridden method.
thanks!
An overridding method cannot throw a new CHECKED exception that isn't the same type or isn't a sub type of the type thrown by the original method.
An ArithmeticException isn't a checked Exception. Basically Unchecked Exceptions are subclasses of RunTimeException. A complete discussion of Checked and Unchecked Exceptions is in JLS 11.5. The complete JLS can be found here
http://java.sun.com/docs/books/jls/index.html [This message has been edited by Carl Trusiak (edited July 11, 2000).]