“架构中立"和“架构中立"有什么区别?和“便携式"? [英] What is the difference between "architecture-neutral" and "portable"?

查看:23
本文介绍了“架构中立"和“架构中立"有什么区别?和“便携式"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在阅读 Herbert Schildt 的书Java:The Complete Reference",他在书中写道 Java 是可移植的且与架构无关.这两个概念有什么区别?文字看不懂.

I'm reading Herbert Schildt's book "Java: The Complete Reference" and there he writes that Java is portable AND architecture-neutral. What is the difference between this two concepts? I couldn't understand it from the text.

推荐答案

看看这个 Java 白皮书.

基本上,他们是说除了在多个环境中运行(因为在 JVM 中被解释)之外,无论环境如何,它也运行相同.前者使其具有便携性,后者使其与架构无关.例如,int 的大小不会因平台而异;它是由 JVM 建立的.

Basically they're saying that in addition to running on multiple environments (because of being interpreted within the JVM), it also runs the same regardless of environment. The former is what makes it portable, the latter is what makes it architecture-neutral. For example, the size of an int does not vary based on platform; it's established by the JVM.

这篇关于“架构中立"和“架构中立"有什么区别?和“便携式"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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