You are on page 1of 1

Compiler -

Is a program that converts instructions into a machine-code or lower-level form so that


they can be read and executed by a computer.

How does JVM work?

Java Virtual Machine (JVM) is a engine that provides runtime environment to drive the
Java Code or applications. It converts Java bytecode into machines language. JVM is a
part of Java Run Environment (JRE). In other programming languages, the compiler
produces machine code for a particular system

Example: C, C++, C#, Java


In a compiler, the source code is translated to object code successfully if it is free of
errors. The compiler specifies the errors at the end of compilation with line numbers
when there are any errors in the source code. The errors must be removed before the
compiler can successfully recompile the source code again.>

Example of Compilers:

The Java Virtual Machine manages system memory and provides a portable execution environment for
Java-based applications.

ROLE of JVM

The JVM has two primary functions: to allow Java programs to run on any device or operating system
(known as the "Write once, run anywhere" principle), and to manage and optimize program memory.

You might also like