ankitweblogic logo
W e b t u t o r i a l s

Define Java

C vs C++ vs Java

Java Virtual Machine

Set Java Path

Java Tokens

Reserved Keywords

Identifiers

Literals

Operators

Operator Precedence

Escape Sequences

Java Virtual Machine (JVM)

Java uses both compiler and interpreter to execute programs. Source code written in java is compiled to generate byte code and then this byte code is interpreted to machine instructions for specific machine. The byte code generated by the compiler is not machine specific. It is generated for virtual machine that exists only inside the computer memory known as java virtual machine (JVM).

Java compiler translates source code into byte code.
JVM

Java interpreter translates byte code into machine code.
JVM
Fig: Process of converting Java Program into Machine code.