Why Java is called Compiler Interpreter language

In This tutorial, we will be going to discuss on the Topic Why Java is Called Compiler Interpreter language. Further, we will be looking more on what Compiler and what an Interpreter basically is.

If you don’t know about the topic why is Java called a Compiler Interpreter language? Then you are at the right place because we will be discussing the topic deeply.

Why Java is Compiler and Interpreter language

Keeping aside, the other programming languages such As C language, where we saw that the source code/Program was being directly converted to binary code by the compiler. So, These were OS-dependent ones.

So, to overcome this problem the Java developers came with the solution of putting two stages between The Program and to output – these were Compilation and Interpretation stages.

Initially, we will understand what basically an Interpreted language is. An interpreted language is a type of programming language that most implementation of which gets executed directly, without prior compilation to machine level language instructions.

Now comes the Bytecode system which is implemented in Java. As we know that in java, the compiler does the job.

Compiler initially converts the Program to Bytecode, which is further executed by the Java Virtual Machine(JVM). Below is an image what basically a bytecode looks like:

Why Java is called Compiler Interpreter language

After the Above process gets completed, the next task is a compilation, which is the conversion of Java code to bytecode.

Interpretation Stage

In this process, the java interpreter plays a very significant role. The Java interpreter converts the Code to OS readable binary code, which further gets processed and generates the output.

While the execution of code it is very essential that we load a Java Interpreter that is compatible with OS.

Below is a diagram on the entire Process :

JIT

As discussed before also, Interpreter here is the Java Virtual Machine. And during the making of the different JVM for different OS platform was rather economical than making the compiler entire.

 

Leave a Reply

Your email address will not be published. Required fields are marked *