answersLogoWhite

0


Best Answer

The whole idea of Java - or one of the ideas, at any rate - is that it can be run anywhere. So, instead of compiling for a specific processor, the Java compiler compiles for a "generic processor", called the Java Virtual Machine. The code thus generated is called "bytecode". It can be interpreted (i.e., run) by a Java Virtual machine, these are available on different platforms.

The whole idea of Java - or one of the ideas, at any rate - is that it can be run anywhere. So, instead of compiling for a specific processor, the Java compiler compiles for a "generic processor", called the Java Virtual Machine. The code thus generated is called "bytecode". It can be interpreted (i.e., run) by a Java Virtual machine, these are available on different platforms.

The whole idea of Java - or one of the ideas, at any rate - is that it can be run anywhere. So, instead of compiling for a specific processor, the Java compiler compiles for a "generic processor", called the Java Virtual Machine. The code thus generated is called "bytecode". It can be interpreted (i.e., run) by a Java Virtual machine, these are available on different platforms.

The whole idea of Java - or one of the ideas, at any rate - is that it can be run anywhere. So, instead of compiling for a specific processor, the Java compiler compiles for a "generic processor", called the Java Virtual Machine. The code thus generated is called "bytecode". It can be interpreted (i.e., run) by a Java Virtual machine, these are available on different platforms.

User Avatar

Wiki User

14y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

7y ago

The primary benefit of byte code is that it can be interpreted much more efficiently than would be possible with the high-level source code. It's best to think of byte code as being the native language of the virtual machine (the interpreter), as opposed to the native machine. Being native to the interpreter means the exact same byte code can be executed upon any physical machine that has a suitable virtual machine implementation. Machine code, on the other hand, is machine specific and therefore non-portable. As such, the source code must be compiled separately for each supported device, whereas byte code need only be compiled once. However, native machine code does not require interpretation and therefore executes much more efficiently than byte code.

This answer is:
User Avatar

User Avatar

Wiki User

14y ago

The whole idea of Java - or one of the ideas, at any rate - is that it can be run anywhere. So, instead of compiling for a specific processor, the Java compiler compiles for a "generic processor", called the Java Virtual Machine. The code thus generated is called "bytecode". It can be interpreted (i.e., run) by a Java Virtual machine, these are available on different platforms.

This answer is:
User Avatar

User Avatar

Wiki User

7y ago

The fact that it can run on different platforms (different types of computers, or operating systems).

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the primary benefit of byte code?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What is the purpose of a byte in Java?

Java coding uses byte as one of the programming directives to clarify commands. Byte can also be used in the Java code to save memory space when the need arises.


How many no of instructions does the java byte code has?

200 instructions only.


What is compiled code?

Compiled code is plain-text source code that is translated from an English-like, high-level language into either machine code or byte code by a program known as a compiler. Machine code is the native language of the machine, consisting of binary patterns that represent a sequence of machine instructions and their operands. Byte code is the native language of a virtual machine; a machine that only exists within a computer's memory. The virtual machine is simply a program that interprets the byte code in order to produce the actual machine code. Unlike machine code which must be compiled separately for each platform, byte code will run on any platform that has a corresponding virtual machine implementation.


Define the concept of Java Bytecode and its importance?

1. The byte code is intermediate language. 2. It is not understandable by user as well as processor. 3. Tjava program(.java) will get converted to byte-code(.class) after compilation. 4. It is a set of highly optimized instructions. Advantages(impotance) of byte code: 1. It is useful for exchanging java program without disclosing the logic implemented in it to others. 2. The byte code are many times compressed version of actual Java program.Therefore,it is easy and fast to transport them over the internet. 3. Byte codes are not executable and they are platform independent.


Executon steps in java?

First of all the compiler converts our source code into byte code ,this is done by "javac" compiler.then we use interpretor that is the"java interpretor" for making our byte code executed.thats y java is called as an compiled and interpred language.by that way our java program will be interpreted. First of all our source code vl b converted into byte code by da java compiler named "javac" ,then dt byte code vl be executed by da interpretor named "java" interpretor. These are execution steps in java dts y v call java as a compiled and interpreted language.

Related questions

Why the byte code is verified?

when we compile a file in java, it creates a byte code which later on gets interpreted to machine understandable code. byte code is not machine language. where system understands only machine language. hence the interpretation of byte code is required.


What is the Byte code definition?

Java compiler produces an intermediate code after compilation, understandable by JVM is called Byte Code.


What is the capacity of primary memory?

describe a byte


What is BYTE Code in java?

Java byte code is the code that is output by the Java compiler. Byte code is not machine code, it must be interpreted to create the machine code. This is handled by the Java virtual machine. Pretty much every platform produced today has a Java virtual machine implementation, so the same byte code can be executed upon any machine. Byte code can be regarded as being the native language of the virtual machine, as opposed to machine code which is the native language of the physical machine.


What is expanding opcode?

A code that leaves a spare bit to indicate that if that bit is set, consider this byte and the next byte to be defining the entire code.


How java is fast?

Java is not fast. Compared to equivalent code compiled to native machine code it is extremely slow. However, it is somewhat faster than many other interpreted languages because the source code compiles to Java byte code which is suitable for interpretation by any Java virtual machine. Interpreting byte code is much quicker than interpreting source code and, unlike machine code, byte code is portable.


What is the difference between runtime and compilation?

Compilation is generally the process of parsing the human-readable source code and turning it into machine-readable byte code. Runtime occurs during the execution of the byte code as a program. Examples: A compile-time error is an error that occurs while the source code is being turned into byte code. A runtime error is an error that occurs while the program is executing.


What is the purpose of a byte in Java?

Java coding uses byte as one of the programming directives to clarify commands. Byte can also be used in the Java code to save memory space when the need arises.


Does one byte in computer code represent 25?

No it represents 8


How many no of instructions does the java byte code has?

200 instructions only.


What is compiled code?

Compiled code is plain-text source code that is translated from an English-like, high-level language into either machine code or byte code by a program known as a compiler. Machine code is the native language of the machine, consisting of binary patterns that represent a sequence of machine instructions and their operands. Byte code is the native language of a virtual machine; a machine that only exists within a computer's memory. The virtual machine is simply a program that interprets the byte code in order to produce the actual machine code. Unlike machine code which must be compiled separately for each platform, byte code will run on any platform that has a corresponding virtual machine implementation.


How is java byte code is different from other low level language?

Java byte-code is the code which generate after the compilation of .java file.And this code is only understand by JVM(java virtual machine ) which understand it and execute it.In other languages this type of functionality is not available.