oop-examples/lessons/Inheritance.md
2020-05-24 17:04:37 +02:00

534 B

Inheritance

Inheritance is useful to minimize code duplicates and generalize types in base classes.

A Class can inherit all public and protected functions and fields from a base class and add its own or override existing ones. Private fields and functions still exist in the base class, but can't be acessed from the extending class.

Examples