In the same way that a child inherits the traits of his or her parents, and parents inherit the characteristics of their predecessors, inheritance in programming languages works in the same way. They are also known as the parent and child classes, respectively. ![]() A superclass, also known as a base class, is a class whose members are inherited, whereas a subclass, also known as a derived class, is a class that inherits from a superclass. Inheritance is a basic aspect of object-oriented programming.
0 Comments
Leave a Reply. |