The following procedure helps you create your HelloWorld Java program.
Note: This procedure assumes that you already have a working java environment on your computer.
1. Create a folder in c:\ProgrammingStacks Samples.
2. Create the HelloWorld.java file in the newly created folder.
3. Copy and Paste the code below into your file.
* Comments #1 for the HelloWorld class
* Comments #2 for the HelloWorld class
public class HelloWorld
*Comments for the main method
public static void main(String args)
// Print the Hello World! message.
4. Open a command prompt window by:
- Open Start
- Type command prompt into Start.
- Click Command Prompt
4. Compile your HelloWorld.java file by keying-in javac HelloWorld.
4. Execute or run your HelloWorld java program by keying-in java HelloWorld.