DEV Community

Rohith ND
Rohith ND

Posted on

Hello World ๐Ÿ‘‹ in various languages

Python (.py)

print('Hello world!')
Enter fullscreen mode Exit fullscreen mode

Bhai Lang

hi bhai
 bol bhai "Hello World";
bye bhai
Enter fullscreen mode Exit fullscreen mode

Javascript (.js)

console.log('Hello world!');
Enter fullscreen mode Exit fullscreen mode

Typescript (.ts)

console.log('Hello world!');
Enter fullscreen mode Exit fullscreen mode

Java (.java)

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

C (.c)

#include <stdio.h>
int main()
{
    printf("Hello World");
    return 0;
}
Enter fullscreen mode Exit fullscreen mode

c++ (.cpp)

#include <iostream>
using namespace std;
int main()
{
    cout<<"Hello World";
    return 0;
}
Enter fullscreen mode Exit fullscreen mode

PHP (.php)

<?php
    echo 'Hello World';
?>
Enter fullscreen mode Exit fullscreen mode

C# (.cs)

using System;
class HelloWorld {
  static void Main() {
    Console.WriteLine("Hello World");
  }
}
Enter fullscreen mode Exit fullscreen mode

Dart (.dart)

void main(){
   print("Hello World");
}
Enter fullscreen mode Exit fullscreen mode

VB (.vb)

Module VBModule
    Sub Main()
        Console.WriteLine("Hello World")
    End Sub
End Module
Enter fullscreen mode Exit fullscreen mode

HTML (.html)

<html>
  <body>
   <h1>Hello World</h1>
  </body>
</html>
Enter fullscreen mode Exit fullscreen mode

Ruby (.rb)

puts "Hello World"
Enter fullscreen mode Exit fullscreen mode

Scala (.scala)

object HelloWorld extends App {
println("Hello World")
}
Enter fullscreen mode Exit fullscreen mode

Perl (.pl)

print "Hello World";
Enter fullscreen mode Exit fullscreen mode

Pascal (.pas)

program Hello;
begin
  writeln ('Hello World')
end.
Enter fullscreen mode Exit fullscreen mode

R (.r)

print("Hello World")
Enter fullscreen mode Exit fullscreen mode

Fortan (.f95)

Program Hello
Print *, "Hello World"
End Program Hello
Enter fullscreen mode Exit fullscreen mode

Haskell (.hs)

main = putStrLn "Hello World"
Enter fullscreen mode Exit fullscreen mode

Objective C (.m)

#import <Foundation/Foundation.h>

int main (int argc, const char * argv[])
{
        NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
        NSLog (@"Hello World");
        [pool drain];
        return 0;
}
Enter fullscreen mode Exit fullscreen mode

Swift (.swift)

print("Hello World")
Enter fullscreen mode Exit fullscreen mode

Rust (.rs)

fn main() {
    println!("Hello World");
}
Enter fullscreen mode Exit fullscreen mode

Go (.go)

package main
import "fmt"
func main() {
    fmt.Println("Hello World")
}
Enter fullscreen mode Exit fullscreen mode

Bash (.bash)

echo "Hello World";
Enter fullscreen mode Exit fullscreen mode

ASP.NET (.aspx)

Response.Write("Hello World");
Enter fullscreen mode Exit fullscreen mode

Top comments (0)