Computer Science, asked by Ankush777, 1 year ago

What is JVM?? Elaborate..

Answers

Answered by Rajdeep11111
22
Hulloa friend!!
Rajdeep here.....

Whenever you say the word "ELABORATE", I remember of the dialogue which the Engineering teacher gave in the film "3 idiots"...

However, JOKES APART!!
here's your answer:

JVM, also called Java Virtual Machine, is a software, which works as an Interpreter in Java. 

Now, what is an Interpreter?
Suppose you only know the language of HINDI, but you need to meet someone in Russia, who only knows Russian. Now, you appoint a person, who converts what the Russian says to you line by line into HINDI and what you say to the Russian in Hindi, line by line to Russian.

So, he is an Interpreter here.

Similarly, Java is a high level language. The source code (language in which we write) is not understood by our computer. The source code needs to be converted to Machine code, after which the program code can be executed.

First of all, the Source code is converted into Byte Code by the Compiler, which is independent of the machine on which it is to be run (this means that it can run on any Operating System, be it Windows or UNIX or Linux or Macintosh).

For executing the program in a specific machine with a specific OS, the byte code needs to be converted to the Machine code, which shall be independent of the machine. This work is done by the JVM.

Thus, as a whole, in the definition of JVM, you can write:
Java Virtual Machine is an interpreter in Java which converts the Byte code into Machine code, which is independent of the machine on which it is to be run.

Hope my answer is satisfactory and ELABORATED!!
Thanks (^_^)

Nikki57: 3 idiots xD Cool answer brother! Kudos!
Rajdeep11111: HAHAHAHAH :)
Answered by SohamKundu012
6

JVM is an abstract machine designed to be implemented on top of existing processors .

It helps to convert the given code in JAVA to bytecode and then we can intrepret the code for a given platform by using an interpreter .

This interpreter is called JVM .

The full form of JVM is Java Virtual Machine .

The code is first written in .java .

Then converted to bytecode and then .exe by the JVM .

Similar questions