0
why do we need to convert byte code into machine code?
3 Respostas
+ 2
java is compiled and interpreted language, also as you know java is purely platform independent,
compiler converts source code(.java) into intermediate code ( .class), called bytecode. this is how java support's concept of portability and platform independence,
however, intermediate code is not a machine instruction, therefore, the machine can't executive it , and as you know all the processors understand only machine language, so we have to interpret the bytecode.
the interpreters convert the bytecode into machine code for particular platform.
+ 1
bcz computer can only understand machine language not English in which we code the program.
+ 1
pretty simple, bytecode is not a machine code, it's a compiled version of your Java source code, it contains the set of instructions for JVM. this bytecode can be read by any machine / platform where JVM is installed. Then it's JVM is responsibility to convert your bytecode into that specific platform/machine understanble code