Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - Java array objects can directly call the clone () method to clone arrays. Non-array objects cannot be called if they do not override the clone () method and are set to public.
Java array objects can directly call the clone () method to clone arrays. Non-array objects cannot be called if they do not override the clone () method and are set to public.
This is a type conversion exception. Cannot automatically convert from an object to a test type, and requires a forced conversion.
Test test = newtest (); //The class created by yourself will not overwrite the clone () method of the Object class.