posted 21 years ago
When you override clone() from Object its visibility should be raised from protected to coderanch. Is the reason for this simply to allow also non-subclasses in other packages to clone your objects ? Or is there another reason for this ? For classes in the same package I can not see that it matters if the clone() implementation is public or protected
I know that since clone() is protected in Object, subclasses of Object can only invoke clone() on its own objects, and not any object. That is not my question.
regards,
Svein