In the previous articles i explained : What is Object Oriented Programming, Advantages of Object Oriented Programming, How Java different from C and C++, History of Java, What is Java Technology, Asp.Net Alert Box, Asp.Net Setup and Deployment, Asp.Net Connection String, Asp.Net Authentication and Authorization and Facebook sidebar like box for website.
Implementation of a Java application program involves a series of steps. They include creating the program, compiling the program, running the program.
Creating the Program
We can create a program using any text editor and we must save this program in the file called filename. Java where filename is the name of the class which includes the main method.
Compiling the Program
To compile the program, we must run the Java compiler Javac with the name of the source file on the command line Javac filename.Java. Javac compiler creates a file called filename.class containing the byte codes of the program.
Running the Program
We need to use the Java interpreter to run a stand-alone program. At the command prompt, type
Now, the interpreter looks for the main method in the program and begins execution from there. When executed, our program displays the following:
This is the example of a java program.