Hello World in 10 Popular Programming Languages – Complete Beginner Guide

Hello World in 10 Popular Programming Languages – Complete Beginner Guide

Hello World Programs in Multiple Languages

Absolutely! Let’s go step by step for each language. I’ll give you the simplest “Hello, World!” example and explain how to write and run it.


1. JavaScript

Code (hello.js):


console.log("Hello, World!");

Steps to run:

  1. Install Node.js.
  2. Save the code in a file named hello.js.
  3. Open terminal and run:
    node hello.js
  4. Output:
    Hello, World!

2. Python

Code (hello.py):


print("Hello, World!")

Steps to run:

  1. Install Python.
  2. Save the file as hello.py.
  3. Run in terminal:
    python hello.py
  4. Output:
    Hello, World!

3. TypeScript

Code (hello.ts):


console.log("Hello, World!");

Steps to run:

  1. Install Node.js and TypeScript:
    npm install -g typescript
  2. Save the file as hello.ts.
  3. Compile to JavaScript:
    tsc hello.ts
  4. Run the compiled JS file:
    node hello.js
  5. Output:
    Hello, World!

4. SQL

Example using SQLite (hello.sql):


SELECT 'Hello, World!' AS greeting;

Steps to run:

  1. Install SQLite or use any SQL client.
  2. Save as hello.sql.
  3. Run in terminal:
    sqlite3 :memory: < hello.sql
  4. Output:
    greeting
    ----------
    Hello, World!

5. Java

Code (HelloWorld.java):


public class HelloWorld {
    public static void main(String[] args) {
        System.out.println("Hello, World!");
    }
}

Steps to run:

  1. Install Java JDK.
  2. Save as HelloWorld.java.
  3. Compile:
    javac HelloWorld.java
  4. Run:
    java HelloWorld
  5. Output:
    Hello, World!

6. C#

Code (HelloWorld.cs):


using System;

class HelloWorld {
    static void Main() {
        Console.WriteLine("Hello, World!");
    }
}

Steps to run:

  1. Install .NET SDK.
  2. Save as HelloWorld.cs.
  3. Compile and run:
    dotnet run HelloWorld.cs
  4. Output:
    Hello, World!

7. C++

Code (hello.cpp):


#include <iostream>
using namespace std;

int main() {
    cout << "Hello, World!" << endl;
    return 0;
}

Steps to run:

  1. Install a C++ compiler like g++.
  2. Save as hello.cpp.
  3. Compile:
    g++ hello.cpp -o hello
  4. Run:
    ./hello
  5. Output:
    Hello, World!

8. Go

Code (hello.go):


package main
import "fmt"

func main() {
    fmt.Println("Hello, World!")
}

Steps to run:

  1. Install Go.
  2. Save as hello.go.
  3. Run:
    go run hello.go
  4. Output:
    Hello, World!

9. Rust

Code (main.rs):


fn main() {
    println!("Hello, World!");
}

Steps to run:

  1. Install Rust.
  2. Save as main.rs.
  3. Run:
    rustc main.rs
    ./main
  4. Output:
    Hello, World!

10. Bash

Code (hello.sh):


#!/bin/bash
echo "Hello, World!"

Steps to run:

  1. Save as hello.sh.
  2. Make it executable:
    chmod +x hello.sh
  3. Run:
    ./hello.sh
  4. Output:
    Hello, World!

Comments

Popular posts from this blog

How to Install Geany 2.1 on Windows 10/11 (2026) | Step-by-Step Guide

How to Uninstall Bluefish 2.2.19 on Windows 10/11 (2026) | Step-by-Step Guide

How to Install Visual Studio 2026 on Windows 10/11 | Step-by-Step Guide