Function Overriding
Learn about overriding inherited functions
We'll cover the following
Overriding inherited functions
When a derived class inherits from a base class, it may choose to change some of the inherited functionality. This is called function overriding, since the derived class is overriding the functionality of the base class.
Example
Here’s a simple example to demonstrate this:
Get hands-on with 1400+ tech skills courses.