What is the difference between “architecture-neutral” and “portable”?

前端 未结 9 958
忘了有多久
忘了有多久 2020-12-14 12:40

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

9条回答
  •  一个人的身影
    2020-12-14 13:42

    .class file is portable because it can run on any OS . The reason is , .class file generated by JVM is same for all OS. On the other hand JVM is differ as OS , but it generate same .class file for all OS, so JVM is architectural neutral.

提交回复
热议问题