动态绑定== Java中的后期绑定?

编程入门 行业动态 更新时间:2024-10-26 22:19:07
本文介绍了动态绑定== Java中的后期绑定?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

在不同的来源中,我读到了关于该主题的不同文章.例如,维基百科说:

In different sources i've read different things on the topic. For example Wikipedia says:

后期绑定通常与动态调度相混淆,但是存在显着差异.

Late binding is often confused with dynamic dispatch, but there are significant differences.

但是几行之后

在Java编程中经常使用术语后期绑定作为动态调度的同义词.具体来说,这是指Java与虚拟方法一起使用的单一调度机制.

it is popular to use the term late binding in Java programming as a synonym for dynamic dispatch. Specifically, this refers to Java's single dispatch mechanism used with virtual methods.

那么真相在哪里,这是什么显着差异"?

So where's the truth and what are this "significant differences"?

推荐答案

对于所有意图和目的,后期绑定和动态单次分发都是相同的.在动态单调度中,单个对象的值或标识确定在运行时调用哪个代码,这就是Java中发生的情况.

Late binding and dynamic single dispatch are, for all intents and purposes, the same. In dynamic single dispatch, the value or identity of a single object determines which code is invoked at runtime, and that's what happens in Java.

一般来说,术语动态调度通常用于表示动态 multiple 调度,这是在运行时根据运行时的标识或值选择运行时方法的地方. 一个以上的对象,这是CLOS和Smalltalk中的一种语言功能,但不是Java或C ++中的语言功能.

The term dynamic dispatch in general is most often used to imply dynamic multiple dispatch, which is where the runtime method is chosen at runtime based on the identities or values of more than one object, which is a language feature in CLOS and Smalltalk, but not in Java or C++.

更多推荐

动态绑定== Java中的后期绑定?

本文发布于:2023-08-04 17:43:16,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1298322.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:绑定   后期   动态   Java

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!