shadowing, overloading, and overriding

shadowing, overloading, and overriding

Shadowing, similar to Overloads, allows you to define a method that has the same name as another method in a base class, but without having to ensure a different signature.

You can also shadow a method that is defined in the same class using the Shadows keyword and a different signature, however this has the similar effect of overloading a method and can be used when your intent is to overload and protect your methods at the same time. And since the Shadows keyword is the default, declaring multiple methods with the same name and different signatures without using either keyword is enough to ensure they are both overloaded and shadowed (I never said this was simple!).