Paul Clapham wrote:
But a method whose body only calls the same method from the superclass is actually pointless. If you didn't write that code, then calling the class's clone() method would still call the clone() method from the superclass, which is Object. That's what inheritance does.
However Object's clone() is protected, so if you want to provide a public clone method of this type, you have to override Object's one in order to make it public.
But how to implement it? Well, through "super.clone()"
Object's clone's API docu writes:
By convention, the returned object should be obtained by calling super.clone.
If a class and all of its superclasses (except Object) obey this convention, it will be the case that x.clone().getClass() == x.getClass().