开发者

Late Binding vs. Polymorphism - what is the difference?

I've seen both u开发者_开发问答sed interchangebly but do they really mean the same? From my understanding, Polymorphism stretches the fact that you could exchange an instance of a class by an instance of a subclass, and Late Binding means that when you call a method of an instance, the type decides which method (subclass/superclass) gets called.


Wikipedia has a very nice article about this:

http://en.wikipedia.org/wiki/Polymorphism_in_object-oriented_programming

Summary: Late binding is a way to implement polymorphism.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜