public class ClassName {
public static void main(String[] args) {
System.out.println("Hello World");
}
}
Don't Worry about the syntax for now. We will learn it in the next few weeks.
- Compiling a Java program means taking the programmer-readable text in your program file (source code) and converting it to bytecodes.
- Bytecodes are the instructions that the Java Virtual Machine (JVM) understands.
The Java compiler is invoked at the command line by typing the command:
javac ClassName.java
Running a Java program means executing the bytecodes that were created by the compiler. The Java Virtual Machine (JVM) is the program that executes the bytecodes.