Got compile error at line1: Unreported Exception Compare to this code:
compile ok. Why?
posted 13 years ago
Compiler check only on Checked Exceptions and not non-checked exceptions Exception exception is a checked exception. All run-time exceptions - RuntimeException and all its subclasses - are non-checked exceptions, so the compiler doesn't check on them during compilation. HTH