Computer Science, asked by kushikavya88, 1 year ago

java program uses a compiler as well as an interpreter explain

Answers

Answered by vishveshmodcoipbsqzf
31

The Compiler of java called as javac converts source code into a Intermediate file known as Bytecode file. The Bytecode file is unique for all types of OS means bytecode is platform independent

Now

The Interpreter of java (java) converts Bytecode into the specific OS compatible machine code . This code will vary according to OS.

The problem the programmer were facing that They had to design a different compiler for different Operating System that is too difficult, Too time consuming and much Costly.

Then Sun Microsystem take the whole Initiative by making :

a Unique compiler that produce Platform Independent Bytecodes and

the Specific JVM(Java Virtual Machine)or Interpreter that converts bytecodes into machine code that will vary from OS to OS.

and making different JVM for different OS was much easier and economical than the whole Compiler.

SO, The JAVA was more Popular and more in use than any Language.

Hope It Helps You.....

Answered by kartikey9820
77

Answer:

Java uses compiler as well as interpreter.This is because firstly Java source code is converted to byte code by Compiler and then the interpreter comes in use which converts byte code to further machine code like Unix,MS dos,Windows7 etc.

Attachments:
Similar questions