Print Hello World

A simple program that prints "Hello World" to the console, introducing the basic structure of a Java application.

Problem Statement

Write a Java program that prints "Hello World" to the console.

Source Code

1 public class HelloWorld {
2 public static void main(String[] args) {
3 System.out.println("Hello World from Eduinq!");
4 }
5 }

Program Output

Hello World from Eduinq!

Explanation

The class HelloWorld defines the program structure, with the main method acting as the entry point. Inside main, System.out.println() prints the text "Hello World from Eduinq!" to the console, demonstrating the basic skeleton of a Java application including class definition, the main method, and console output.

Quick Links to Explore