Platform Independence in Java
this is especially for you, mrinmoy, in java, the code is converted into a byte code, which can be interpreted by all operating systems. and the JVM interprets this byte code. JVM is the same regardless of the operating system where it is installed.
there are 3 layers in any program execution:
1. program
2. byte code
3. OS
OS talks to the byte code which is interpreted by JVM. this byte code is OS independent.
for the same reason, writing decompilers for java is simpler as compared to any other language.