Java is both Compiled and interpreted Language. Therefore Executing a java program is two stage process described as follows:
- Compiling a source file(.java) and create byte code file(.class)
- Interpreting byte code(.class) file and create binary code(.exe)file
Fig: Java program Execution process
See the diagram:
i) Java program is converted into byte code file by java compiler (javac)
ii) JVM converts byte code file into binary code (.exe) file i.e. instructions which can be understood by operating system and hardware directly.
This two stage process makes java platform independent as java files are not directly converted to executable files instead they are converted to byte code file which can be used on any platform.
For more features refer following link:
No comments:
Post a Comment