Polymorphism is the ability to perform the same task in many different ways. There are two types of polymorphism, run time polymorphism and compile-time polymorphism.