Which catch block should be written first when handling multiple exceptions?
BPSC Past Papers / All — Multiple-choice practice
متعدد استثناء کو سنبھالتے وقت کونسا کیچ بلاک پہلے لکھا جانا چاہئے؟
- A. None of these
- B. Order Irrelevant
- C. General
- 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
- Which of the following is an equivalence relation? Transitive, Reflexive, Symmetric, All of them
- If production in factories rises sharply, pressure on which energy-consuming sector increases most directly?
- which of the following vitamin is produced in human body with the help of Sunlight.?
- The smaller particles of ash and dust may be blown by wind and spread over large areas in layers they become hardened into rocks that are called ______?
- Which element is most responsible for temperature extremes in Pakistan?
- Why are high-voltage direct current (HVDC) transmission systems preferred for long-distance power transmission?
Found an error? Report a correction with this page URL and a supporting source.