![]() |
![]() |
![]() |
Lesson 1: Hello World
Hello World |
|
|
In this video lesson, you will learn how to program a small application called Hello World. Here are the steps involved:
You will now have a basic console project with one class that contains the main method. A main method is necessary to run any console application. This is what the main method looks like:
public static void main(String args[]) {
}
You will also see grayed-out lines that look something like this: // TODO application code here /** * * @author: * */ These are comments. They are for programmers' use to write notes about the code and other information. They do not affect the code execution, so you can just leave them as they are. Now, you will need to put some code inside the main method so that you can make the application do something. Inside the curly brackets {} of the main method, type this:
System.out.println("Hello World!");
Your main method should now look like this:
public static void main(String args[]) {
System.out.println("Hello World!");
}
Now, we need to build and run the application to see the output. Here are the steps:
Success! You have now programmed your first application in Java. |
|
![]() |
![]() |
![]() |
| Home | | | Reference | | | Play Games! | | | Blog | | | Forum | | | Site Map | | | Contact Us |





