Java cloning abstract objects
问题 I'm wondering if there is any way to do the following. I have an abstract class, Shape , and all its different subclasses and I want to override the clone method. All I want to do in the method is create a new Shape from the toString() of the current one. Obviously I can't do the following because Shape is abstract. Is there another way to do this because overriding clone in every subclass just for a simple name change seems useless. public abstract class Shape { public Shape(String str) { //