Starlit Daily

📚 › Java

1. Your first Java program

Java programs run inside a class. The main method is where execution starts. System.out.println prints a line.

Java is compiled first, then the compiled file runs on the Java Virtual Machine, so one program works on many systems.

Show example

public class Hello {
  public static void main(String[] args) {
    System.out.println("Hello, Java");
  }
}

← Back to course