Compiling Your First Java Program!
In this lesson, an explanation of how to compile your code in Java, which compilers to use and the most suitable ones for different Operating Systems, is provided.
For the computer to execute the Hello World code you have written, it first needs to be compiled by a Java compiler. The compiler translates the computer code written in a particular programming language into the machine code.
What does the compiler do?
In very broad terms:
š” Did you Know?
The compiler is a translator that acts as an intermediary between the programmer and the CPU on the computer.
A high-level language like Java is actually a sort of ācompromiseā language between the native language of the CPU (generally referred to as machine language) and the native language of the programmer (say English).
Computers do not natively understand human languages. Therefore, the compiler is reading the code written by the programmer and translating it into machine language code that the computer can execute directly.
In Java
, programs are not compiled into executable files; they are compiled into ...