First Java Program

1. Download an Install JDK from http://www.oracle.com/technetwork/java/javase/downloads/index.html
2. Set Path
3. Write the following  Java source code in any text editor and save it as HelloWorld.java.

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


4. Compile the java source code by typing javac HelloWorld.java on command prompt.
5. Now run the java code by typing java HelloWorld
6. Bang! You got the output on the screen.


Wait for more programs...............

Comments

Popular posts from this blog

Zeller's Congruence

Property Event-Delegation

Method with variable arguments