The most unique feature of Java is platform independence. In any programming language source code is
compiled into executable code. This cannot be run across all platforms.
Bytecode generated in a Windows environment can also be executed in a Linux environment. This makes Java platform independent.
When Javac compiles a Java program it generates an executable file called a .class file. a class file containing byte codes. Byte codes are interpreted only by JVM’s. Since these JVMs are made available across all platforms by Sun Microsystems, we can execute this byte code on any platform.