How is Java Platform Independent? | ninjasquad
In previous tutorial you learned about features of Java language but In this tutorial, We will provide justify of the feature Java Platform Independent.
Our machine understand machine level language but it is not possible to write code in machine level language that’s why we write code in human readable and then this source code is converted to machine level language. So, Computer can understand our instructions.
In C/C++ programming language the code is converted into machine language with the help of compilers and we get .exe file which is platform dependent and this make the languages platform dependent.
Java Platform Independent means that byte code or we can say compiled code can run on all operating systems. In the case of java language the source code firstly converts into byte code using compiler.
Then we can use this byte code file on any operating system but the pre-requisite Java Virtual Machine(JVM) installed on that computer and this JVM interpret the byte code file into machine understandable format that’s how is java platform independent.
Happy Coding!! 😊