Friday, February 20, 2009

Creating Your First Java Program

I used the codes below through JC Creator. These codes work as well in other Java variants, they may differ in the environment where you add these codes and run them.

The basic structure of a Java program is this:

[+/-] show/hide

public class Greetings{
public static void main( String args [ ]){
System.out.print ("Hello! Welcome to Java programming!");

This program must be saved as since we use public to make this file known to other classes.

Compile and run this code.

No comments: