nerdexam
GIAC

GSSP-JAVA · Question #102

Which of the following circumstances can prevent the execution of code in a finally block? Each correct answer represents a complete solution. Choose two.

The correct answer is B. An exception arising in the finally block itself. D. The use of the System.exit(0); statement in the finally block. See the full explanation below for the reasoning.

Question

Which of the following circumstances can prevent the execution of code in a finally block? Each correct answer represents a complete solution. Choose two.

Options

  • AAn exception arising in the try block that precedes the finally block.
  • BAn exception arising in the finally block itself.
  • CNo exception condition arising in the try block that precedes the finally block.
  • DThe use of the System.exit(0); statement in the finally block.

How the community answered

(39 responses)
  • A
    8% (3)
  • B
    77% (30)
  • C
    15% (6)

Community Discussion

No community discussion yet for this question.

Full GSSP-JAVA Practice