This entry is a response to the online assignment of our Graduate School for Interpretation and Compilation
Is there a programming language that does both interpretation and compilation?
The answer is a big YES.
This was made possible by the Java Programming Language who first compiles a text code in order to represent it to its equivalent code that the virtual machine can understand and then interprets it upon execution. The said sequence is shown in this diagram:

This diagram shows the compilation and interpretation done by the Java programming language. The developer writes a code in a text editor and saves it in a file with an extension of “.java”. The created java file is now compiled to the “machine” code called as “bytecode” for the Java Virtual Machine to understand. The JVM then simulates a processor then executes the bytecode instructions. The java file now is converted into a new file with an extension of “.class”. The class file is now interpreted by the Java interpreter that converts the bytecode into the machine language of the particular computer
Thus, Java does both compilation (for some degree of code optimization) and interpretation (for portability). This kind of implementation is known as “Hybrid Implementation”
Isn’t it great?
Web Reference:
- http://www.particle.kth.se/~lindsey/JavaCourse/Book/Part1/Supplements/Chapter01/interpreterCompiler.html
Reference:
- BALAGTAS, FLORENCE TIU (2005). INTRODUCTION TO PROGRAMMING I Version 1. Java Education and Development Initiative, 22-24.

