answersLogoWhite

0

Why java interpreted?

Updated: 8/10/2023
User Avatar

Wiki User

14y ago

Best Answer

Java is both compiled and interpreted.

At first, the Java source code (in .java files) is compiled into the so-called Bytecode (.class files). The Bytecode is a pre-compiled, platform independent version of your program. The .class files can be used on any operating system.

When the Java application is started, the Bytecode is interpreted by the Java Virtual Mashine. Because the Bytecode is pre-compiled, Java does not have the disadvantages of classical interpreted languages, like BASIC.

User Avatar

Wiki User

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

Wiki User

12y ago

Java uses both a compiler and interpreter. It is both compiled and interpreted.

  • Java compiler (javac) converts java code into Bytecode.
  • Just-In-Time compiler converts Bytecode to more specific instructions.
  • Interpreter executes Bytecodes.
This answer is:
User Avatar

User Avatar

Wiki User

11y ago

Java is both a compiled language and an interpreted language.

No, technically, Java is solely a compiled language. Java source code is ALWAYS compiled (via javac or similar program) down into a bytecode.

The confusion may be that the Java bytecode is usually run on a Java Virtual Machine implementation, which both compiles the bytecodes to native machine code AND also runs as an interpreter for some java bytecode. The JVM is form of a system emulator, which is NOT specificly related to the Java language itself. That is, it is entirely possible to make a hardware machine (which has already been done) which runs Java bytecode natively, directly on the hardware.

Do not confuse the Java language with Java bytecode.

This answer is:
User Avatar

User Avatar

Wiki User

14y ago

Java is interpreted (or actually translated into JVM byte code) to allow the resulting class to be executable by any computer that has a compatible JRE installed on it. Contrast this to a C compiler, where the result is machine specific. Java byte code is also machine specific - that machine, however, is a virtual machine provided by the JRE.

This answer is:
User Avatar

User Avatar

Wiki User

11y ago

java used mostly interpretor to convert bytecode to machine dependant code.

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

java is a high-level programming language so it needs an interpreter to convert it to byte code so that computers can understand it's instructions

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

Java is a programming language.

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

yes

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Why java interpreted?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

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.


Why java is platform independent explain by diagram?

Java is a platform independent language becoz of the bytecode magic of java. In java, when we execute the source code...it generates the .class file comprising the bytecodes. Bytecodes are easily interpreted by JVM which is available with every type of OS we install.


Is java interpreter or compiler?

Java has both a compiled and an interpreted stage.1) The programmer writes his source codes (.java extension); a compiler will compile this to bytecode (.class extension).2) When the end-user runs the .class program, the JVM (Java Virtual Machine) will interpret this.


What are the different phases of java?

Based on the lecture i have , there are three JAVA PHASES -- editor. First step in creating java program is by writing ur programms in a text editor. Ex, notepad, emacs etc -- java compiler. compile. The program by. Using the java compiler. The output of this process is a file of java bytecodes wid the file extension.class -- java interpreter. The .class file is then interpreted by java interpreter that converts the bytecodes into the machine language of the particular computer your using ---abioo4---


Java is both compiled and interpreted language meaning?

Instead of compiling to machine language, the Java compiler compiles for a "ficticious processor". A program called the Java Virtual Machine then interprets this on every machine. Note that Java is NOT an interpreted language. It is solely a compiled language. Java source code is always run through a compiler (typically 'javac') to be turned into bytecode. This is identical behavior as any other compiled language. The confusion is that Java bytecode is usually run on a Java Virtual Machine, which itself may both act as an interpreter and a compiler for the native instruction set the JVM runs on. However, the Java language itself is NOT dependent on how this bytecode is run - in fact, it is possible (and has been done) to build a hardware machine that runs Java bytecode directly.

Related questions

Can vista read java?

Yes. Due to Java being an interpreted language, almost any system can read it. In fact, I'm running vista with java right now.


WHO convert high level program in to machine language programs?

Nobody. Conversion from high-level encoding to low-level encoding is achieved via software, either by a compiler (compiled languages) or by an interpreter (interpreted languages). Some languages, such as Java, use both; compiling to Java byte code which is then interpreted by the Java virtual machine.


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.


What in computing is java?

Java is a computer programming language. Java programs can be interpreted (the computer compiles and runs the program as the code is executed) or it can be pre-compiled into bytecode (the computer doesn't have to compile it as soon as it is run, so time is saved.)


Why java is platform independent explain by diagram?

Java is a platform independent language becoz of the bytecode magic of java. In java, when we execute the source code...it generates the .class file comprising the bytecodes. Bytecodes are easily interpreted by JVM which is available with every type of OS we install.


Where is a program temporally stored for execution?

All programs must be loaded into memory (e.g., RAM) in order to be executed. Compiled programs can be loaded directly since they consist of native machine instructions, but interpreted programs must be translated by a runtime program. E.g., Java is an interpreted language which compiles to byte code which must be interpreted by the Java Virtual Machine implementation at runtime.


Why 2 files in java program?

There are programming languages in which the source file is read and interpreted directly, but those are usually slower than when the program is compiled, to an EXE, or as in Java, for a virtual machine.


Is java interpreter or compiler?

Java has both a compiled and an interpreted stage.1) The programmer writes his source codes (.java extension); a compiler will compile this to bytecode (.class extension).2) When the end-user runs the .class program, the JVM (Java Virtual Machine) will interpret this.


Advantages of C over C plus plus and java?

C can be faster than C++ programs, and definitely faster than Java, since Java is primarily interpreted. C is also somewhat less rigid in definitions as well, not as tightly structured as either C++ or Java can be.


What are the major differences between Java programming language and any other programming language?

Java, while not very different from some languages is different from most languages is that it is interpreted, it is not in a language that the computer can understand, it is run by the jvm. Unlike interpreted languages, however, it also has a compiler which compiles to java bytecode. This is not a real compiler, however, as it's output must still be interpreted. Indeed, the output is even possible to be "decompiled" and turned back into source, only loosing some nonessential things like comments.


What is buzz word in java define?

the Java 'white paper" buzzwords: simple object oriented network savvy robust secure architecture neutral portable interpreted hight performance multithreaded dynamic


Why it is not possible to execute java program on machine which does not have JVM installed on it?

when a java program is compiled it is converted into a non executable code which is byte code, and this byte code can only be interpreted by JVM. so a java program can't be executed on a machine which doesn't have JVM installed on it.