Saturday, October 10, 2009

"Hello World" in Java...

To write this application you will need Sun's Java Development Kit Standard Edition ( JSE ) which is a free download at installing it into your computer and setting the path environment variable write the following Java source in Notepad:

import javax.swing.JoptionPane;

public class HelloWorld {

public static void main ( String args [] )

JOptionPane.showMessageDialog(null"HELLO WORLD!");



Save it on your desktop as

Next open the command prompt and execute the following command: javac

One file HelloWorld.class will be created if there are no errors in your source...To run the program type java Helloworld at your command prompt.


No comments:

Post a Comment