What is Polymorphism
Sigiloso
Polymorphism is perhaps most commonly referred to functions/methods that are overloaded based on the parameters being passed in, for example add(int x, int y) vs. add(string a, string b). In object oriented, this also refers to subtyping. Consider a Vehicle super class and a Bus and Airplane class that inherit from Vehicle. Now a method of a Vehicle object can behave differently depending on whether the vehicle is also a Bus or Airplane. Also a Bus object is now both a Bus and a Vehicle.