I have a quick question regarding the clone()
method in Java, used as super.clone()
in regard to inheritance - where I call the clone()
this class has information about this class as well as it is associated with another class. So, conceptually this class's object will have information of associated class as well. this object is incomplete object without associated object/parent class.all direct as well as indirect fields in this class needs to be copied make it a worth it new clone of current object. we cannot access only that portion of reference which only denotes child section.