0

why do we need to convert byte code into machine code?

10th Jul 2016, 5:58 AM
Nupur
Nupur - avatar
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.
13th Jul 2016, 4:48 PM
Abhishek dubey
Abhishek dubey - avatar
+ 1
bcz computer can only understand machine language not English in which we code the program.
13th Jul 2016, 11:05 AM
Aayush. Aggarwal
Aayush. Aggarwal - avatar
+ 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
14th Jul 2016, 1:31 AM
Vijayakumar G
Vijayakumar G - avatar