0% found this document useful (0 votes)
19 views3 pages

JavaPlatformIndependent 24

Java is a platform independent language because it compiles source code into bytecode that can be run on any system with a Java Virtual Machine (JVM). The JVM converts the bytecode into machine code that can be executed by the hardware, allowing Java programs to run on different operating systems without recompilation as long as a JVM is present. This makes Java platform independent.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views3 pages

JavaPlatformIndependent 24

Java is a platform independent language because it compiles source code into bytecode that can be run on any system with a Java Virtual Machine (JVM). The JVM converts the bytecode into machine code that can be executed by the hardware, allowing Java programs to run on different operating systems without recompilation as long as a JVM is present. This makes Java platform independent.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Java

Platform Independent

• Java is platform independent language

• Java compiler will convert source code into byte code although
this byte code is not executable but it is a error free program

• To execute this java program we call a JVM ( java virtual


machine ) and ask them to execute this le

• This virtual machine will have an interpreter or JIT Compiler that


will convert this byte code into machine code and get it executed
on the hardware

• JVM cannot directly interact with the hardware , it needs to


interact via a software

fi
How java is platform independent

• All the bytes codes rst interact with JVM , as it is the source
which converts the source code into the machine code of java .

• As the byte code is same it can run on various operation system


and produce the same result provided that it has a JVM hence
Java is platform independent

• Therefore once you compile a java code you can run it anywhere

fi

You might also like