0

what is byte code

30th Sep 2016, 7:58 AM
Aman Yadav
Aman Yadav - avatar
6 Réponses
30th Sep 2016, 8:17 AM
Andrew Williams
Andrew Williams - avatar
0
In most of programming languages, a program code have to be compiled and interpreted so can be run on a computer. Software used to compile the program code called compiler, while used for interpretation called interpreter. Java implements the two processes above. This means that Java acts as compiler and also as interpreter. The concept is simple, first, program code written in Java (with .java extension) will be compiled (by compiler) into an object. In Java terminology, this object code is called as bytecode. So, in Java, the end result of program will be a bytecode (with .class extension), instead of the .exe file. Furthermore, the bytecode will be executed line by line (by interpreter). Thus, the compilation process is done only once, but interpretation process will be done every time the program is executed. Bytecode can be reputed as a set of commands in machine language for a JVM (Java Virtual Machine). Every Java interpreter, whether development tool or a web browser, is implementation of JVM. Program created in Java can not run on a computer or other device that does not have a JVM. With the bytecode concept, in Java terminology known the term "write once, run anywhere" (WORA). This means that once we write Java program and compile it, then its bytecode can be run in any platform as long as the platform has JVM. For example, the following image shows the same program but can be run on the Windows, Linux, and Mac platform. More detail about bytecode in http://javabasictoadvanced.blogspot.co.id/2016/02/java-features.html
30th Sep 2016, 8:37 AM
Aula Muttaqin
Aula Muttaqin - avatar
0
Oops that was binary... My bad your right
30th Sep 2016, 10:48 AM
Aquarius
Aquarius - avatar
0
انت عربي
30th Sep 2016, 1:11 PM
Qewads Qewads
Qewads Qewads - avatar
0
byte code is not in 0's and 1's. when compiler compiles our source code, source code is converted to new format that can only be read by JVM is known as byte code. byte code is some type series of instructions ( like assembly language code) and can only understandable by JVM.
30th Sep 2016, 5:39 PM
Vaibhav Kharche
Vaibhav Kharche - avatar