Overriding in Swift

A subclass can provide its own custom implementation of an instance method, type method, instance property ,type property and subscripts that it inherits from its superclass. This is known as overriding. In order to override a property or method, we have to include the override keyword as a prefix before the method, property or subscript that will be overridden.

Leave a Reply

%d bloggers like this: