Q) Why JVM code is called as Byte code?
·JVM
code is called Byte Code because JVM language mnemonics are 256.
·To
store any mnemonics we need minimum of one byte. So JVM mnemonics are called as
Byte code.
Q) What is Byte Code?
The
source code of a Java program is compiled into an intermediate language called
"byte code." In order to run the byte code, it must be compiled into
machine code just before execution or a line at a time via the Java Virtual
Machine (JVM) runtime engine. There are JVMs for all major hardware platforms
(i.e. for all operating systems).
Q) Why Java interpreter is called as JVM?
· Java
interpreter works similar to actual micro processor (machine).
· Java
interpreter is working same as actual machine so it is called virtual machine
(means not a real machine). Micro processor is a hardware component.
· JVM
is not hardware component, but it is software component.
Q) Who does develop JVM, OS vender or
SUN?
JVM
is developed by SUN not by OS vender.
Q) Will JVM available for all
operating systems?
Yes
JVM is available for all operating systems separately.
Q) Why does java use both compiler
and interpreter?
Java
is both compiled and interpreted language.First Java source code has to be
translated into Byte code, which is done with the help of a compiler.But these
byte codes are not machine instructions. Therefore ,in second stage this byte
code has to be translated into machine code.This task is performed by an
Interpreter.Hence, Java use both compiler and interpreter.