Examveda
Examveda

What is the result of the following code snippet?

try {
throw new RuntimeException();
} catch (RuntimeException e) {
System.out.println("Runtime Exception!");
} catch (Exception e) {
System.out.println("Exception!");
}

A. Exception!

B. Compilation error

C. No output

D. Runtime Exception!

Answer: Option D


This Question Belongs to Java Program >> Exceptions

Join The Discussion

Related Questions on Exceptions