🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← All topics

Quiz: Java Exception Handling: questions with answers

10 questions, each with the answer and a short explanation.

Take the timed quiz + get a certificate →
  1. Q1. What does this print? (code)
  2. Q2. Which is a checked exception?
  3. Q3. What is the difference between throw and throws?
  4. Q4. Which order of catch blocks compiles?
  5. Q5. What does try-with-resources guarantee?
  6. Q6. What does this print? (code)
  7. Q7. What does this print? (code)
  8. Q8. Your custom exception extends RuntimeException. What does that mean for callers?
  9. Q9. When does a finally block NOT run?
  10. Q10. What does this print? (code)