Compilation and interpretation are few approaches that are used generally for the implementation of the code by programming languages.
A compiler can be defined as a program that helps in transforming a code. This transformation is done for the code that has been written in any programming language (source language) into another programming language that was targeted by you. They perform this task by translating the source code from a much high-level programming language to a low-level programming language i.e. machine language.
An interpreter analyses your source code line by line and instruction by instruction and then performs the execution of the corresponding machine code on the targeted machine directly without any involvement of a third party.
Although compilation and interpretation are the two principles with the help of which the implementation of the programming languages is done, they are also related to each other in some cases. This relation comes out as most of the systems that use interpretation do perform some works of translation. The translation work is done by compilers also.
What is OpenJDK? OpenJDk or Open Java Development Kit is a free, open-source framework of the Java Platform, Standard Edition (or Java SE).