Introduction to Java
Source: Dev.to
How does Java code written by humans get executed by machines?
It uses a translation system (JDK → JRE → JVM → JIT) to convert the programming language to machine language.
What is JDK?
- JDK stands for Java Development Kit.
- Java source files should be saved with the
.javaextension (e.g.,Sample.java). - If there are no errors, the
.javafile is compiled into a.classfile (e.g.,Sample.class). - The
.javafile is human‑readable, while the.classfile is not directly readable. - If there are errors, the compiler reports them with specific details such as the line number (e.g., line 3).