Extends class inheritance

Father Son inheritance

When you want to call other scripts

Father class variables or methods which

Can Son r = new Son () is equivalent to the Father r = new Father ()  

 

 Note: The function can only single inheritance, but you can inherit multiple layers, such as son inherits father, father can inherit granpad, son script to create objects that can retrieved granpad or father through the son of a function or variable

Guess you like

Origin www.cnblogs.com/kaibindirver/p/11886515.html