here...meth()doesn't throw any checked exceptions..and method() is catching the only runtime exception that meth() throws..so why doesn't the compiler give an error?- catching an exception(here---catch (Exception e)) that has never been thrown??any exception that isnt a checked exception is a runtime exception...and that is caught by the code..so is it ok to catch Exception again??am i clear?
It doesn't seem to violate any of the exception rules. You must declare that a method "throws" exception or provide a catch clause for it only if it is checked exception. RuntimeException and its subclasses are considered unchecked.