本文介绍了方法重载被视为多态吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
方法重载被认为是多态性的一部分吗?
Is Method Overloading considered part of polymorphism?
推荐答案
多态性"只是一个词,没有全球公认的精确定义.对您的问题的是"或否"答案都不会启发您,因为差异将在于所选的多态性"定义,而不是方法重载的本质(作为任何特定语言的功能).您可以在此处的其他大多数答案中看到这一点的证据,每个答案都介绍了自己的定义,然后根据该定义评估语言功能.
"Polymorphism" is just a word and doesn't have a globally agreed-upon, precise definition. You will not be enlightened by either a "yes" or a "no" answer to your question because the difference will be in the chosen definition of "polymorphism" and not in the essence of method overloading as a feature of any particular language. You can see the evidence of that in most of the other answers here, each introducing its own definition and then evaluating the language feature against it.
这篇关于方法重载被视为多态吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!