I have a shape (don't know what kind of shape it is), and I want to create another shape that is exacly the same.
I've tried this (as dumb as it sound):
Shape b = a; (a beeing the shape I already have).
Here is the actual code (simplified):
public class Box extends CenaVisivel {
public Shape box = null;
public Box(Shape shape){
box = shape;
...
}
}
The problem of doing this is that the box and the shape ocuppie the same memory space (they are the same SAME! like, if you change one, you change the other), and I dont want that, I want diferent shapes that have the same properties.