The introduction of Java (Hello World!)

1comments

To start learning java, I'll give an example of a simple coding that is commonly given if we want to learn Java for the first time, the Hello World!.

To be easy here I use the Windows Operating System (XP or the free will of 7). First open "Notepad". Then type the following script:

-----------------------------------------------------------------
public class HelloWorld {
public static void main {String [] args) {
System.out.println("Hello World!");
}
}
-----------------------------------------------------------------
Then save the name HelloWorld.java, remember the file name must match the class name is used. Then open Commandprompt. For example, we store the files on drive C: \. So on our Commandprompt typing the following:

---------------------------------
C:\javac HelloWorld.java
C:\java HelloWorld
HelloWorld!
---------------------------------
HelloWorld! , The output of the script that we wrote above earlier. How? not easy.


Share this article :

+ comments + 1 comments

Lopo
March 3, 2012 at 2:00 PM

Lumayan buat belajar java nih gan..

Post a Comment

Ads

 
Support : Creating Website | Johny Template | Mas Template
Copyright © 2011. Share It Out - All Rights Reserved
Template Created by Creating Website Published by Mas Template
Proudly powered by Blogger