Briefly describe what polymorphism is

A brief description of polymorphism:

Polymorphism The same behavior has the ability to have multiple different manifestations or forms.
It means that the same method of a class instance (object) has different manifestations in different situations.
The polymorphism mechanism allows objects with different internal structures to share the same external interface. This means that although the specific operations for different objects are different, they (those operations) can be invoked in the same way through a common class.

Guess you like

Origin blog.csdn.net/qq_40694640/article/details/112969087