class inheritance and overriding differences, class inheritance override differences
The inheritance of a class is the existence of an inheritable member a in the parent class, and no member of the same name exists in the subclass so that the member is inherited to the subclass, and when the subclass object accesses the member, the corresponding member of the parent class is actually accessed.
Class is overridden by the existence of an inheritable member a in the parent class, and a member of the same name exists in the subclass so that the member is overridden by the quilt class, and when the child class object accesses the member, the child class is actually accessed.
So the difference between the two is that when overridden, the overridden member of the access is actually not related to the parent class, and the parent class member is accessed when inheriting.
http://www.bkjia.com/PHPjc/1098998.html www.bkjia.com true http://www.bkjia.com/PHPjc/1098998.html techarticle The difference between class inheritance and overrides is that class inheritance overrides the inheritance of the distinguished class, that there is an inheritable member a in the parent class, and that no member of the same name exists in the subclass so that the member is inherited to the child ...