In previous tutorial you learned about features of Java language but in this tutorial, We will provide justification of the feature Java Platform Independent.
Our machine understands 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 an .exe file which is platform dependent and this makes 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 first converts into byte code using compiler.
Then we can use this byte code file on any operating system but the prerequisite Java Virtual Machine (JVM) installed on that computer and this JVM interprets the byte code file into a machine understandable format that’s how java is platform independent.
Happy Coding!! 😊