Hello World
Java**
class HelloWorld{ public static void main(String[] args) { System.out.println("Hello World!!"); }}
C
#include<stdio.h>int main(void){ printf("Hello, world!"); return 0;}
Python
print('Hello World')
C++
#include <iostream>using namespace std;int main(){ cout <<"\nHello World"<< endl; return 0;}
C#
using System;namespace helloWorld{ class HelloWorld { static void Main(string[] args) { Console.WriteLine("Hello World!"); } }}
Visual Basic .NET
Module HelloWorld Sub Main( ) System.Console.WriteLine("Hello world!") End SubEnd Module
JavaScript
console.log("Hello World");
PHP
<?php // In PHP, we use echo to print text echo "Hello World"; //... read more
Hello World
Hello World
Java**
class HelloWorld
{
public static void main(String[] args)
{
System.out.println("Hello World!!");
}
}
C
#include<stdio.h>
int main(void)
{
printf("Hello, world!");
return 0;
}
Python
print('Hello World')
C++
#include <iostream>
using namespace std;
int main()
{
cout <<"\nHello World"<< endl;
return 0;
}
C#
using System;
namespace helloWorld
{
class HelloWorld
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
}
}
}
Visual Basic .NET
Module HelloWorld
Sub Main( )
System.Console.WriteLine("Hello world!")
End Sub
End Module
JavaScript
console.log("Hello World");
PHP
<?php
// In PHP, we use echo to print text
echo "Hello World";
// If you want to print in browser's console, we use print_r
print_r("Hello World");
// if you want the variable data types as well use var_dump
$stringVar = 'hello world';
var_dump($stringVar);
?>
Objective-C
#import <Foundation/Foundation.h>
int main(int argc, const char * argv[]) {
@autoreleasepool {
NSLog(@"Hello World!");
}
return 0;
}
SQL
``SELECT 'Hello World';
PRINT 'Hello World';
Ruby
puts 'Hello World'
MATLAB
fprintf ( 1, 'Hello, world!' );
quit