Thursday, April 30, 2009

Hello World


Problem Statement:
Print "Hello World" on screen.

Language:
C and Java

Platform:
Command Prompt

Command:
[Program]

Expected Input:
None

Expected Output:
Hello World

Example:
Interface in C:
C:\Program> ./hello_world.exe
Interface in Java:
C:\Program> java hello_world

Output (Same for both C and Java):
Hello World

2 comments:

  1. //hello world program in java
    class Hello{

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


    //output
    C:\Users\cli\Documents\Pushpa\Java test>javac Hello.java

    C:\Users\cli\Documents\Pushpa\Java test>java Hello
    Hello world!!

    ReplyDelete