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
public class HelloWorld { Defines a class named HelloWorld. public static void main(String[] args) { Entry point of the program. System.out.println("Hello World from Eduinq!"); Prints text to the console with Eduinq branding. Closing braces } End of method and class. Conclusion: This program demonstrates the basic skeleton of Java. It shows how to define a class, declare the main method, and print text to the console.