Implementation of a Java Program

 

History

In the previous articles i explained : What is Object Oriented ProgrammingAdvantages of Object Oriented ProgrammingHow Java different from C and C++History of JavaWhat is Java TechnologyAsp.Net Alert Box, Asp.Net Setup and DeploymentAsp.Net Connection StringAsp.Net Authentication and Authorization and Facebook sidebar like box for website.

Introduction

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.

Implementation of a Java Program

Running the Program

We need to use the Java interpreter to run a stand-alone program. At the command prompt, type

Java filename

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.

Give your Valuable Comments.
comments powered by Disqus
 
Follow me on twitter
About Me
Harpreet Singh
I began programming with C++ when i was 17. Then at the middle of my study .NET came. Then I began to read C# and VB.NET. By the time i learnt SQL and ASP.NET, and developed some websites such as news portals that are active now. Currently i am running my own Software company.
More Articles