Sunday, June 5, 2022

Why java is platform independent ?


What is JVM (java virtual  machine) 
  1. JVM stands for Java Virtual machine.
  2. It takes byte code as input and gives binary as output.
  3. JVM is platform  dependent  but  makes java as platform-independent 
  4. JVM has interpreter and JTT in it 
  5. JVM physically does not exist.
JVM



Why java is platform-independent?

  1.  JVM  makes java as platform  Independent but JVM is platform Dependent.
  2.  Source File is converted into class File /Byte code /intermediate file with the help  of the compiler  
  3. Class Files can be executed in any platform which has JVM.
  4. JVM is java virtusal machine which is present  in the java runtime environment (JRE)
  5.  In JVM there is a JIT compiler which takes a class file as input and interpreted into binary file as Output.

0 comments:

If you have any doubts,please let me know