educative.io

Educative

Is polymorphism same as overriding?

The code sample given in Polymorphsim and Overriding chapters same. Their behavior is also same. Does it mean, the ploymorphism and Overriding are same?

Overriding is essentially a type of polymorphism. Overriding is a way to achieve polymorphism.