← Quiz: Java Exception Handling: all 10 questions
Quiz: Java Exception Handling · Question 8 of 10
Your custom exception extends RuntimeException. What does that mean for callers?
Your custom exception extends RuntimeException. What does that mean for callers?
- A.They must catch it or declare throws
- B.It is unchecked: the compiler does not force them to catch or declare it
- C.It cannot be caught
- D.It becomes an Error
Answer & explanation
Correct answer: It is unchecked: the compiler does not force them to catch or declare it
Subclasses of RuntimeException are unchecked. Extend Exception instead to make it checked.
Can you get the rest right without peeking?
Take the timed Quiz: Java Exception Handling quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →