Building future while learning

Platform Independent.

1 min read

 Why Java is Platform Independent?

Note:  C compile prgms are PD (Platform dependent)

             Java compile prgms are PI  (Platform Independent)

Common technologies used in programming are:-


1. Source Code –> Developer written code

2. Compiled Code –> Compiler generated code

3. Executable Code –> the code ready to execute


4. Compilation :- process of converting source code to compile code

5. Execution :-     process of converting compile code to get output


6. Compiler :- Translator s/w converts complete source code to compiled code

7. Interpreter :- It is also a translator s/w converts parts of the source code in compile code, it is slow in compilation




How Java achieved PI?

By moving machine language generation from compilation phase to execution phase by introducing Byte code and JVM
Byte code is native language of JVM ,it is intermediate code for all OS.
JVM is a Java platform ,it is a translator s/w that converts byte code into current OS machine language , execute and display output.
JVM s/w is available and given by SUN for all OS, so the program compiled in one can be executed in any other OS.

P.I. Block-Diagram

Leave a Reply

Your email address will not be published. Required fields are marked *