Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Different forms of polymorphism
Prashant Basnet
Dec 12, 2024
43 views
1. Ad-hoc Polymorphism
Function or operator overloading based on different types
2. Parametric Polymorphism
Generic functions or types that can operate on any type.
3. Subtype Polymorphism (or Inclusion Polymorphism)
Using a subclass where a superclass is expected, common in OOP.
4. Coercion Polymorphism
this form allows for automatic conversion of types in expressions. It often occurs in languages with implicit type conversion.