Hello world!

by TechMynd on December 29, 2012

in General

That’s right!

Just – Hello World !!!

Its a programmer’s first lesson.

What is Hello World? Here is how to say Hello World…

PHP

<?php
echo "Hello World"; 
?>

HTML

<!DOCTYPE html>
<html>
<body>
Hello, world!
</body>
</html>

JavaScript

<script type="text/javascript">
document.write('Hello, world!');
print('Hello, world!');
</script>

Pearl

print "Hello World\n";

CGI

#!/usr/local/bin/perl
print "Content-type: text/html\n\n";
print "<H1>Hello World</H1>\n";

C

#include <stdio.h>
int main(int argc, char *argv[])
{
    printf("Hello, world!\n");
    return 0;
}

C++

#include <iostream>
using namespace std;
int main()
{
    cout << "Hello, world!" << endl;
    return 0;
}

Java

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

Visual Basic .NET

Module Module1
    Sub Main() 
        Console.WriteLine("Hello, world!")
    End Sub
End Module
'non-console example:
Class Form1
    Public Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load()
        MsgBox("Hello, world!")
    End Sub
End Class

Visual Basic

MsgBox "Hello, world!"

SQL

SELECT 'Hello, world!' FROM DUAL
SELECT 'Hello, world!'

Shell

echo Hello, world!

Ruby

puts "Hello, world!"

Pascal

program HelloWorld;
uses crt;
begin
  WriteLn('Hello, world!');
end.

Batch File

@echo Hello, world!

ActionScript

trace ("Hello, world!");

Next post: