What is JDK
Describe the key steps in which a Java class is loaded by the JVM?
What are runtime data areas?
How is a java program executed by JVM?
Explain how Java programs are executed by the JVM?
What is the Java bytecodes?
What is the difference between JVM, JRE and JDK?
How is Java programming language machine and platform independent?
The process of execute Java program by JVM
Java class files or bytecodes that are loaded to the runtime data areas are executed by the execution engine,
which is a component of the JVM. Before executing, the execution engine reads and transforms the bytecodes into native code that the underling OS can understand.
Execution engine can transform the bytecodes into native code two ways.
Interpreter: Execution engine reads, interprets and executes the bytecode one by one. Since it has to interpret and then execute the bytecodes, execution is slow.
JIT (Just In Time)Compiler : The execution engine runs as an interpretor first, while the JIt compiler compiles the entire byte code to native code. Once the native code is generated, the execution engine no longer interprets the bytecodes, it executes the native code directly.