后期绑定与多态性-有什么区别? [英] Late Binding vs. Polymorphism - what is the difference?

查看:91
本文介绍了后期绑定与多态性-有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经看到两者互换使用了,但是它们的意思真的一样吗?根据我的理解,多态性扩展了一个事实,即您可以通过子类的实例交换类的实例,而Late Binding意味着当您调用实例的方法时,类型决定了将调用哪个方法(子类/超类).

I've seen both used 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.

这篇关于后期绑定与多态性-有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆