java - How to properly override clone method? - Stack Overflow

java - How to properly override clone method? - Stack Overflow

瀏覽:824
日期:2025-12-16
If a class and all its superclasses call super.clone() within their clone methods, a subclass will generally only have to override clone() if it adds new fields whose contents would need to be cloned. If any superclass uses new rather than super.clone(), ...看更多