Beginner Tut: How To Write A Simple "Hello World" Program
For beginners' sake we will be discussing on how to write a simple Java program that will print out "Hello World". I assume that you have already set up your machine with Java and have a nice Java compiler running. If not please visit my previous post on how to do that here.
Before we begin, let's get little knowledge about Java. Java is a low-level, object oriented programming language. By the term - Object Oriented, I mean that it makes use of Classes and Objects to run. We would be talking about all that stuff later!
With all that said, let's get down to business!
The code:
public class HelloWorld
{
public static void main(String args[])
{
System.out.println("Hello World!");
}
}
Notes:
Now create a file with your text editor and save as "HelloWorld.java" and compile the program with your respective compiler. If there are no errors in your program, the program output should be "Hello World!".
Yipee! I guess there should be no problem with writing that simple code now. Yes?
Beginner Tut: How To Write A Simple "Hello World" Program
Reviewed by Unknown
on
13:40
Rating:
Reviewed by Unknown
on
13:40
Rating:

Thanks a lot! You really made me enthusiast about learning Java! Keep up the good work
ReplyDelete