clone()
method but don't implement the Cloneable
interface.
This usually represents a programming error.
Use the Only warn on 'public' clone methods option to ignore methods that aren't public
.
For classes designed to be inherited, you may choose to override clone()
and declare it as protected
without implementing the Cloneable
interface and decide whether to implement the Cloneable
interface in subclasses.