Java Professional — Medium
Key points
- Object.clone() creates a shallow copy of an object
- Implementing Cloneable interface is necessary for using Object.clone()
- Overriding clone() method allows for deep copy behavior
- Deep copy semantics require additional implementation steps
Ready to go further?
Related questions
