0
what is bytecode?
5 Answers
+ 4
Bytecode, also known as portable code or p-code, is a form of instruction set designed for efficient execution by a software interpreter. Unlike human-readable source code, bytecodes are compact numeric codes, constants, and references (normally numeric addresses) that encode the result of parsing and semantic analysis of things like type, scope, and nesting depths of program objects. They therefore allow much better performance than direct interpretation of source code. (Ń Wikipedia)
+ 2
Bytecode is computer object code that is processed by a program, usually referred to as a virtual machine, rather than by the "real" computer machine, the hardware processor. The virtual machine converts each generalized machine instruction into a specific machine instruction or instructions that this computer's processor will understand. Bytecode is the result of compiling source code written in a language that supports this approach. Most computer languages, such as C and C++, require a separate compiler for each computer platform - that is, for each computer operating system and the hardware set of instructions that it is built on. Windows and the Intel line of microprocessor architectures are one platform; Apple and the PowerPC processors are another. Using a language that comes with a virtual machine for each platform, your source language statements need to be compiled only once and will then run on any platform.
+ 2
firstly bytecode is machine independent.
after compilation of java program , we get the bytecode , and then that code is converted into machine code using jvm interpreter.
0
hello
- 1
hello