Friday, April 15, 2011

Java "Hello World"

This is my first attempt to write something about java and java technologies. In my blog I will try to give information about java programming language.

In this small text (on the picture), we will say Hello to the World via java programing language.

Hello World is a classic sample to start when we learn a new programming language. Below is the Java version of Hello World program, it simple enough to start.




The code contains one class called Main, a main(String[] args) method which is the execution entry point of every Java application and a single line of code that write a Hello World string to the console.

The Main class must be saved in a file named Main.java, the class file name is case sensitive. In the example we also define a package name for the class. In this case theHelloWorld.java must be placed in a helloworld directory.

Then build and run it. . .



No comments:

Post a Comment