It was a design mistake in Java (yes, Java is not perfect!).
Better to avoid cloning in Java. For example, Josh Bloch points to effective Java, clause 11:
The Cloneable interface was intended as the mixin interface (clause 18) for objects that advertise that they allow cloning. Unfortunately, this cannot serve this purpose. Its main drawback is that it lacks the clone method and the method of cloning objects. You cannot, without resorting to reflection (point 53), call the cloning method on an object only because it implements Cloneable. Even a reflective call may fail because there is no guarantee that the object has an available clone. Despite this shortcoming and others, the object is in wide use, so it pays to understand this.
If you want your objects to be cloned, use the copy constructor or copy method.
source share