Junior — Middle
Can you name synonyms of the term polymorphism used in object-oriented programming?
sobes.tech AI
Answer from AI
In object-oriented programming, polymorphism is also often called:
- Overloading — when one method has several variants with different parameters.
- Overriding — when a subclass changes the behavior of a method in the superclass.
- Dynamic dispatch — the mechanism of selecting a method at runtime.
Although these terms are related to polymorphism, polymorphism itself is the ability of objects of different classes to respond to the same messages (method calls) in different ways.