🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Exceptions and Files: all 15 questions

Quiz: Exceptions and Files · Question 1 of 15

Which block ALWAYS runs, error or not?

Which block ALWAYS runs, error or not?

  1. A.try
  2. B.except
  3. C.else
  4. D.finally
Answer & explanation

Correct answer: finally

finally runs in every case, which makes it ideal for cleanup.

Can you get the rest right without peeking?

Take the timed Quiz: Exceptions and Files quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →