What is the use of implementing a cloneable interface as it is a marker interface?
I can always make a public Object clone() method in my class. What is the actual p
The purpose is specified in the javadoc. It is to specify that cloning of an object of this type is allowed.
If your class relies on the built-in implementation of clone() (provided by the Object.clone() method), then this marker interface enables field-by-field cloning. (If you call the built-in clone method on an object that doesn't implement Cloneable, you get a CloneNotSupportedException.)