Bytecode is a term that denotes a form of intermediate code, a binary representation of an executable program designed to be executed by an interpreter or virtual machine rather than by hardware. Instructions of the bytecode may be arbitrarily complex as it is processed by software, but are nonetheless often analogous to machine instructions. Like the object modules different parts may often be stored in separate files, but loaded dynamically during execution.
The name bytecode defines java instruction set which has one-byte opcodes followed by optional parameters. Intermediately representations like bytecode may result as the output by programming language implementations to make the interpretation easier, or it may be used to reduce hardware and operating system dependence by allowing the same code to run on different platforms. We can execute the Bytecode either directly on a virtual machine or it may be further compiled into machine code for better performance.
Bytecodes are nothing but the constants, compact numeric codes and references that encode the result of parsing and semantic analysis of things like type, scope and nesting depths of program objects, therefore allowing much better performance comparing to direct interpretation of source code.
Liked it! Share this Tutorial