Public abstract class Shape implements the Cloneable {
Public Object clone () {
The Object clone=null;
Clone=super clone ();
Return clone;
}
}
Super. Clone (); What do you mean, isn't super parent class? Cloneable is an interface, the interface is not implemented! Look not to understand don't understand
CodePudding user response:
If the parent class does not implement, use a subclass implementation method, you see, finally went to the Shape of the clone methodCodePudding user response:
Compile error writing, however,CodePudding user response:
When you compile the super clone (); There won't be an error?