answersLogoWhite

0


Best Answer

native code is machine code each machine has its won set of istruction one machine's native code won't run on another

While bytecode is what java produces and it can run on any machine. when we run bytecode it first get to compile to machine code and then get to run.

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is byte code and native code?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

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.


Which software runs a specific program?

It depends on which specific program you have in mind. Native machine code programs do not require any software to run; the program was converted into the machine's native language during compilation and does not require further translation. However, machine code is non-portable. To execute the same program on another platform the source code must be recompiled for that platform. Conditional compilation directives ensure that the correct machine-specific source code is compiled. Byte code programs, however, do require software to execute. Byte code is not native machine code so must be converted to native machine code while it is executing. This is achieved using a runtime program known as an interpreter. Java is a typical example. Java source code is compiled to Java byte code suitable for interpretation by the Java virtual machine (JVM). Thus a JVM is required to execute Java programs. Unlike native machine code, byte code is portable; the same byte code will execute upon any machine that has a suitable interpreter available.


Which software runs specific program.?

It depends on which specific program you have in mind. Native machine code programs do not require any software to run; the program was converted into the machine's native language during compilation and does not require further translation. However, machine code is non-portable. To execute the same program on another platform the source code must be recompiled for that platform. Conditional compilation directives ensure that the correct machine-specific source code is compiled. Byte code programs, however, do require software to execute. Byte code is not native machine code so must be converted to native machine code while it is executing. This is achieved using a runtime program known as an interpreter. Java is a typical example. Java source code is compiled to Java byte code suitable for interpretation by the Java virtual machine (JVM). Thus a JVM is required to execute Java programs. Unlike native machine code, byte code is portable; the same byte code will execute upon any machine that has a suitable interpreter available.


How does VM code compiler works?

The Java virtual machine is not a compiler, it is an interpreter which primarily performs runtime-translation of Java byte code (the native language of the Java virtual machine) to machine-code (the native language of the physical machine). The Java compiler, on the other hand, is a separate program used to perform compile-time conversion of high-level Java source code to the lower level byte code. Java byte code is highly portable; once compiled, any architecture or platform that implements a JVM can execute the byte code without modification.


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 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.


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 does java generate after compiling the java source code?

Java compiles to Java byte code; the native language of the Java virtual machine (JVM). The JVM is essentially just an interpreter for Java byte code. Each supported platform has its own JVM implementation so the same Java byte code can be executed upon any platform without further compilation, unlike C++ where source code must be compiled separately for each supported platform. However, interpretation results in slower execution speed and higher resource consumption than with C++ which compiles to native machine code.


What does a compiler perform?

A compiler converts high-level source code into native machine. In the case of Java, source code is compiled to Java byte code suitable for interpretation by the Java virtual machine which produces the machine code.


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.


What converts a high level language into a machine language line by line?

An interpreter. Not to be confused with a compiler which compiles the entire program into native machine code, optimising the resultant code for efficiency. However, some compiled languages, such as Java, compile to byte code rather than machine code. Java byte code must still be interpreted by the Java Virtual Machine runtime in order to produce the required machine code, which is more efficient than a fully-interpreted language would be, but nowhere near as efficient as a native machine code compilation would be. The problem with native machine code is that it is non-portable; it must be recompiled for each target platform, whereas interpreted languages do not (the interpreter handles the machine-specifics at runtime).