🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← 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?

  1. A.They must catch it or declare throws
  2. B.It is unchecked: the compiler does not force them to catch or declare it
  3. C.It cannot be caught
  4. 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 →