Why is Java Platform Independent?
At the time of compilation, the java compiler converts the source code into a JVM interpretable set of intermediate form, which is termed as byte code.
This is unlike the compiled code generated by other compilers and is non-executable. The java virtual machine interpreter processes the non-executable code and executes it on any specific machine. Hence the platform dependency is removed.