CodePudding user response:
All the good peopleBut everyone is a good man?
The parent class is a subclass is a good man
CodePudding user response:
A subclass can inherit a parent class, so I can call the superclass object know exactly is who, but a parent has multiple subclasses, assignment and I don't know to whomCodePudding user response:
Problem description is not very good, should be a subclass object can be XiangJiCheng from the attribute assignment in the parent class, this is because the subclass inherits the parent class, so the subclass automatically have the same properties with the parent class, these attributes is the subclass's own, so a subclass object modification is actually own property,So, subclass object and superclass object is actually two separate objects, so should be able to understand your problem
CodePudding user response:
Create a subclass of object can be the reference to the parent class object assignmentAnd create the parent of the object cannot be assigned to a subclass object reference
CodePudding user response:
Son will inherit of Lao zi, have their own things, but I can't have a sonCodePudding user response:
The second floor and the very image of the explanation on the fourth floor,