Assuming that calling clone() in Java just calls the implementation of Object.clone() , I assume that they have the same behavior:
- Another object of the same class was created.
- Fields are copied (up and down the inheritance hierarchy)
- All copies are done in a small way.
- Custom code is not executed (constructors, etc.)
Jon skeet
source share