LearnFrenzy
Sign in Take a free test

Object Class and Wrapper Classes · Object and Wrapper Classes MCQ · Question 6

What Cloneable does Answer, explanation & discussion

  • MCQ
  • Medium
  • 0 comments
  • Answer explained
  • Moderated community
Question 6 Back to Exercise

What happens when Object.clone() is called on an object whose class does not implement Cloneable?

  • A A deep copy is made
  • B CloneNotSupportedException is thrown Correct
  • C null is returned
  • D It does not compile
Correct Answer: Option B

Cloneable is a marker interface with no methods.

Discussion & Comments 0

Share your method, a shortcut, or ask about a step you didn't follow.

No comments yet. Be the first to share your solution!

Post your comment

Comments appear after a quick review by our team.

Search LearnFrenzy

Esc

Quick links