JVM or Compiler Which is important?

Divya P
1 min readApr 20, 2022

Explore java — 1

Compiler:

  1. It is impossible for humans to write the program in byte code. It is must to have compiler.
  2. Compiler compiles the java code to byte code. It gives source file
  3. Java being an interpreter language, the virtual machine had to translate text-editor source code during runtime, a Java program would run very slowly.
  4. Java is typed language. So, compiler won’t allow to hold data of wrong type.
  5. Compiler helps in one of the most important feature in java — dynamic binding. During runtime, it can detect and protect the dangers like trying to use objects for different use.

JVM:

  1. JVM is responsible for converting the byte code to machine readable code.
  2. JVM is code compatibility as it eases a programmer’s job to write code only once and run anywhere.
  3. It allows to develop any application of any complexity.
  4. JVM can run in both client and server.
  5. JVM provides the class loader to load the java classes.

Thanks for reading! Hope it is useful. Follow for more articles.

--

--