• Hello World Programs of most widely used 10 languages

    This post may change in time


    Hello world is the simplest piece of code of any programming language . Mostly it is used for teaching people these languages . This may be the first working code for any coding ninja out there .Probably one have to start with a helloworld program and then move on to more complex programming terms .Below i list Hello world programs for most widely used 10 languages

    1.php


    <?php
    Print "Hello, World!";
    >
    <php
    Echo "Hello, World!";
    ? >

    2.javascript


    <script type="text/javascript">
    document.write('Hello World');
    </script>

    3.c#


    class Hello
    //This program displays Hello World
    {
    static public void Main()
    {
    System.Console.WriteLine("Hello World");
    }
    }


    4.java



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


    5.c++



    include
    using namespace std;
    void main()
    {
    cout << "Hello World!" << endl; cout << "Welcome to C++ Programming" << endl; }


    6.android app


    package com.android.helloandroid;

    import android.app.Activity;
    import android.os.Bundle;
    import android.widget.TextView;

    public class HelloAndroid extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    TextView tv = new TextView(this);
    tv.setText("Hello, Android");
    setContentView(tv);
    }
    }


    7.Objective-C


    #import
    int main( int argc, const char *argv[] ) {
    printf( "hello world\n" );
    return 0;
    }


    8.Python



    $ vim helloworld.py

    #!/usr/bin/python

    # Hello world python program

    print "Hello World!";



    9.perl



    #!/usr/bin/perl
    print "Hello World.\n";




    10.Actionscript



    package ca.flashdev.hello {
    public class HelloWorld {
    public function sayHello():String {
    var greeting:String = "Hello World!";
    return greeting;
    }
    }
    }

0 comments:

Leave a Reply

Featured Video

POPULAR POSTS

shared items

VISITORS SO FAR