Which catch block should be written first when handling multiple exceptions?

BPSC Past Papers / All — Multiple-choice practice

متعدد استثناء کو سنبھالتے وقت کونسا کیچ بلاک پہلے لکھا جانا چاہئے؟

  1. A. None of these
  2. B. Order Irrelevant
  3. C. General
  4. D. Specific

Correct answer

Specific

Explanation

Explanation Specific exceptions should be caught before general ones to avoid being overshadowed. Writing a general exception first can prevent specific exception blocks from executing.

Continue with All MCQs, explore all BPSC Past Papers topics, or try the All practice quiz.

More All questions

Found an error? Report a correction with this page URL and a supporting source.