What is the difference between bytecode and source code
Java is not machine dependent. At runtime, the JVM interprets the byte code to produce the required machine-dependent code. Every platform that supports Java has its own JVM, thus the same byte code can execute upon any supported platform.
The translation from byte code to machine-dependent code is handled solely by the platform JVM. Java is both compiled and interpreted language. First Java source code has to be translated into Byte code, which is done with the help of a compiler. But these byte codes are not machine instructions.
Therefore ,in second stage this byte code has to be translated into machine code. This task is performed by an Interpreter. Hence, Java use both compiler and interpreter. The source program is the source code the programmer writes. The object program constitutes the object files containing the object code created by the compiler which is used by the linker to create the machine code. Byte code is the unique characteristics property of the java programming language, basically the intermediate representation of java programs.
It is something like a normal text file. Therefore, it cannot be affected by virus. It is an intermediate between a human readable source and a machine readable source. The one that i shuved up your mums pussyhole. Log in.
Computer Programming. Java Programming. Study now. See Answer. Best Answer. Study guides. Software and Applications non-game 20 cards. What is a programming language. What does DOS stand for. What is a software that is distributed for free. What is application software. Software and Applications non-game 21 cards. Software and Applications non-game 23 cards. Q: What is the difference between source code and byte code? Easy Normal Medium Hard Expert. Writing code in comment? Please use ide.
Load Comments. What's New. Most popular in Difference Between. Most visited in Java. The difference between source code and bytecode is that the source code is a collection of computer instructions written using a human-readable programming language while the bytecode is the intermediate code between source code and machine code that is executed by a virtual machine.
You can download the PDF version of this article and use it for offline purposes as per citation note. Available here. Her areas of interests in writing and research include programming, data science, and computer systems.
Your email address will not be published. Figure Program Execution in Java. Leave a Reply Cancel reply Your email address will not be published. Source Code vs Bytecode. The Source Code is a collection of computer instructions written using a human-readable programming language.
The Bytecode is the intermediate code between source code and machine code that is executed by a virtual machine. Source Code is readable by the human or the programmer.
The Byte Code is readable by the virtual machine. The source code is in the form of plain text with English similar syntax and comments. Method of Execution. The source code is not directly executable by the machine. The bytecode is executable by a Virtual Machine. Execution Speed. Machine code is not executed by a virtual machine it is directly executed by CPU. Hence, the process associated with Byte code and Machine code is also a basic difference.
It is not compulsory that every source code written by a programmer needs not to be converted into byte code for execution by the CPU. Sometimes, when a programmer writes a source code in a particular high-level language, it is converted into byte code and then the byte code is converted to object code so that it can be executed by the processor or the CPU. The difference between source code and byte code is that the source code needs to compulsorily be converted into machine code before it is executed by the CPU.
The conversion of the source code is into byte code is not necessary in all cases. With this, we come to an end of our discussion on the difference between source code and byte code. We have discussed 7 major differences between both these terms. The crux of the discussion was that the processor of a computer can directly execute the machine code of any particular program. On the other hand, the bytecode is created once the source code is compiled which is efficiently executed by a software such as the virtual machine but is not directly understood by the CPU.
We hope that the difference between machine code and byte code is clear in your minds. This blog was an earnest effort in explaining the difference between source code and byte code in an easy manner.
We hope the effort did not go in vain. However, if there are any doubts or queries bothering you, we are always there to help you and make you a holistic developer who is not only prolific in developing advanced applications but is also well versed with the basic concepts of computer science.
You should learn the art of developing websites right from scratch and make yourself a competitive web developer. If you are interested, we might have something that would interest you. Web development has a high scope and it also helps you grab a job in a company of your dreams with a decent salary.
0コメント