“Hello, World!” in Different Languages


Below shows how the different programming languages print the message “Hello, World!.”
Java
Java, a versatile and widely-used programming language, starts with the traditional public class HelloWorld.

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

Python
Python, known for its simplicity and readability, keeps it short and sweet with just a single line to greet the world.

print("Hello, World!")

C++
C++ takes a more structured approach, with headers and namespaces, but still delivers the iconic message with style.

#include <iostream>
using namespace std;

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

JavaScript
It is the language of the web, opts for a “log” to the console to announce its presence.

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

C#
C#, a language for Windows applications, uses a class-based structure to showcase its greeting.

using System;

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

SQL
SQL, the language of databases, deviates from the norm by retrieving a message instead of directly printing it. Known for its simplicity and readability, keeps it short and sweet with just a single line to greet the world.

SELECT 'Hello, World!' AS greeting;

C
Good old C, the foundation of many languages, follows the “printf” tradition to send greetings.

#include <stdio.h>

int main( ) {
  printf( "Hello, World!\n" );
  return 0;
}

PHP
PHP, a web scripting language, wraps its message in PHP tags and employs “echo” to make its introduction.

<?php
echo "Hello, World!";
?>

Go
Go, known for its efficiency, utilizes packages and “fmt” to extend a warm welcome.

package main

import "fmt"

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

Swift
Swift, Apple’s language for iOS development, imports itself and delivers a swift “print” statement.

import Swift

print( "Hello, World!" )

Kotlin
Kotlin, a modern language for Android, keeps it concise and clear with “fun” and “println.

fun main( ) {
  println("Hello, World!")
}

Ruby
Ruby, beloved for its readability, simply “puts” the message on the screen.

puts "Hello, World!"

TypeScript
TypeScript, a typed superset of JavaScript, sticks to the familiar “console.log” for its greeting.

console.log( "Hello, World!" )

Scala
Scala, known for its elegance, introduces an “object”“ and a “def” to send its warm regards.

object HelloWorld {
  def main( args: Array[String] ): Unit = {
    println( "Hello, World!" )
  }
}

R
R, a language for statistical computing, uses “cat” to convey its message with a newline character.

cat( "Hello, World!\n" )

Review: Programming Languages
    Which programming language is used to develop Android apps specifically?

      Go
      Kotlin
      Ruby
      Swift
Result:        




      Maybe if we tell people the brain is an app,    
      they’ll start using it.