Shadowing is either through scope or through inheritance.
Shadowing through inheritance is hiding a method of a base class and providing a new implementation for the same. This is the default when a derived class writes an implementation of a method of base class which is not declared as overridable in the base class. This also serves the purpose of protecting an implementation of a new method against subsequent addition of a method with the same name in the base class.
'shadows' keyword is recommended although not necessary since it is the default.