Because complied java file are executed through the JVM. When Java Code is compiled a byte code is generated which is independent of the system.
The compiler converts source code file into bytecode files. These codes
are machine independent and can be run on any machine. Java interpreter
reads the bytecode files and translates them into machine code for the
specific machine on which the Java program in running. java compiled program can be run on any operating system.
No comments:
Post a Comment