Identify the true statements.
-
Checked exceptions must be explicitly caught or propagated(declared Thrown)
-
Unchecked exceptions must be explicitly caught or propagated(declared Thrown)
-
Checked exceptions in Java extend the java.lang.Exception class
-
Unchecked exceptions extend the java.lang.RuntimeException class
Checked exceptions (like IOException) must be caught or declared in throws clause - this is enforced at compile-time. Unchecked exceptions (RuntimeException and its subclasses) do NOT require explicit handling. Checked exceptions extend Exception (not RuntimeException), while unchecked exceptions extend RuntimeException (which itself extends Exception).
Checked exceptions must be either caught in a try/catch or declared in the method's throws clause, because the compiler enforces handling for them at compile time. Checked exceptions extend java.lang.Exception (but not RuntimeException), while unchecked exceptions specifically extend java.lang.RuntimeException, which is why the compiler doesn't force them to be caught or declared.