What is polymorphism, what is it for, and how is it used?

前端 未结 28 2816
南笙
南笙 2020-11-21 07:08

What is polymorphism, what is it for, and how is it used?

28条回答
  •  梦谈多话
    2020-11-21 07:41

    Usually this refers the the ability for an object of type A to behave like an object of type B. In object oriented programming this is usually achieve by inheritance. Some wikipedia links to read more:

    • Polymorphism in object oriented programming
    • Type polymorphism

    EDIT: fixed broken links.

提交回复
热议问题