Java Scrap Book  

Is the JVM (Java Virtual Machine) platform dependent or platform independent? What is the advantage of using the JVM, and having Java be a translated language?

JVM translates bytecode into machine language

Every Java program is first compiled into an intermediate language called Java bytecode. JVM perform following tasks:

  1. JVM convert java bytecode into machine language code specific to machine.
  2. JVM execute machine language code
Java Byte code are machine and platform independent.this is because Java bytecode can be transferred from one machine to another.

JVM is not machine independent, since it generate machine specific code and it is dependent on operating system.

Java Interview Question