Java Program Explain With Example

Explain Simple Java Program, Java Program Explain With Example

In This Topic & Blog Having Any Query Then Post your Comment and Suggestion Below

First Simple Program
Now that the basic object-oriented underpinning of Java has been discussed, let’s look at
some actual Java programs. Let’s start by compiling and running the short sample program
shown here. As you will see, this involves a little more work than you might imagine.

/*
This is a simple Java program.
Call this file "Example.java".
*/
class Example {
// Your program begins with a call to main().
public static void main(String args[]) {
System.out.println("This is a simple Java program.");
}
}

NOTEOTE
The descriptions that follow use the standard Java SE 6 Development Kit (JDK 6), which is
available from Sun Microsystems. If you are using a different Java development environment,
then you may need to follow a different procedure for compiling and executing Java programs.
In this case, consult your compiler’s documentation for details.

Labels: