Thursday, 17 April 2025

Getting Started with Java: First Program (Hello, World!)

 

🧠 What Is "Hello, World!"?

It's a basic program that does one thing: prints the message Hello, World! to the screen. But more importantly, it introduces you to the structure of a Java program.

//Code

public class HelloWorld

{

    public static void main(String[] args)

    {

          System.out.println("Hello World!");

     }

}


🛠 How to Run It

  1. Open a code editor (like VS Code or just Notepad).

  2. Save the file as HelloWorld.java.

  3. Open Command Prompt (or Terminal).

No comments:

Post a Comment

🚀 Top 3 Java Projects Every Beginner Should Build (With Code Ideas)

 Tired of just printing "Hello World"? It’s time to build something real. 💻 If you're learning Java and want to stand out, ...