Java Hello World

public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
}
This program defines a class called HelloWorld
and a main
method that prints the message “Hello, World!” to the console using the System.out.println()
method. When you run this program, you should see the message “Hello, World!” printed to the console.