nerdexam
GIAC

GSSP-JAVA · Question #264

Which of the following exceptions is thrown if a class uses the clone() method but does not implement the Cloneable interface?

The correct answer is C. CloneNotSupportedException. See the full explanation below for the reasoning.

Question

Which of the following exceptions is thrown if a class uses the clone() method but does not implement the Cloneable interface?

Options

  • ACloneDoesNotExistException
  • BClassNotFoundException
  • CCloneNotSupportedException
  • DNullPointerException

How the community answered

(19 responses)
  • A
    11% (2)
  • B
    5% (1)
  • C
    79% (15)
  • D
    5% (1)

Community Discussion

No community discussion yet for this question.

Full GSSP-JAVA Practice