Vidyalelo
Java Programming · Q30

Exceptions

Programming · Java Programming · question 30

Q30

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

Answer: Option D

Solution

Answer: Option D
No explanation is given for this question Let's Discuss on Board