Is Java a Compiled or Interpreted Language?

Java is both a compiled and interpreted language.

First, a Java source file (.java) is compiled into bytecode (.class) by a program called javac.
In turn another program called java starts the Java Runtime Environment and it may compile/interpret the bytecode by using the Java Interpreter/JIT Compiler.

The following figure depicts the above information:


Reference: https://i.stack.imgur.com/uQyXQ.png


ReferencesStackoverflow question

Comentários

Mensagens populares