Question 10

Additional information sent when an exception is thrown may be placed in ______.

  1. AThe throw keyword
  2. BThe function that caused the error
  3. CThe catch block
  4. DAn object of the exception class
Show answerHide answer

Correct answer: (D) An object of the exception class

Explanation

Corrected: the book's key says (c). The additional information is carried by the exception object that is thrown.

From DSSSB TGT Computer Science Practice Set 3

This is question 10 of DSSSB TGT Computer Science Practice Set 3. See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.