This repository contains a simple Java program that prints “Hello World” to the console. It demonstrates a basic setup for running Java code locally using Java SE 17.
java-explorer
├── HelloWorld.java # Java source file
└── HelloWorld.class # Compiled Java bytecode file
java -version
HelloWorld.java
, then run:
javac HelloWorld.java
This will generate a HelloWorld.class
file.
java HelloWorld
You should see the following output:
Hello World
PowerShell 7.4.6:
PS C:\Home\DEV\Java-SE-17\java-explorer> javac HelloWorld.java
PS C:\Home\DEV\Java-SE-17\java-explorer> java HelloWorld
Hello World
PS C:\Home\DEV\Java-SE-17\java-explorer>
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello World");
}
}
This project is licensed under the MIT License.