On the source code below I\'m rethrowing an Exception.
Why is it not necessary to put the throws keyword on the method\'s signature?
java.lang.Exception is a checked exception so this won't work or even compile. It would work with a unckeched (java.lang.RuntimeException). It makes absolutly no difference whether you throw an exception inside a catch block or not.
The compiler error would look something like this (depending on the compiler):
java: unreported exception java.lang.Exception; must be caught or declared to be thrown
EDIT: Java 7 can deal with such situations if you never actually throw the exception