Is Java completely Platform Independent?

后端 未结 8 1633
鱼传尺愫
鱼传尺愫 2020-12-24 12:43

Is Java completely Platform Independent ?

if not then, what care needs to be taken to see that your code written in Java can run on Multi Platforms. Basically it sho

8条回答
  •  一个人的身影
    2020-12-24 12:57

    As djacobson pointed out, the answer is a qualified "yes". For the most part, Java developers don't have to worry about platform dependencies. However, you may run into problems when you're dealing with APIs that handle traditional OS and platform functions.

    When dealing with File I/O, for example, it's easy to make your code platform dependent by ignoring the differences between file/path separators across platforms (i.e. using '\' rather than File.separator).

提交回复
热议问题