Posts

Showing posts with the label program

Internal mechanism of Platform Independent Language

Platform Independence means that no dependency on Platform. Here Platform mean is environment.We will know here Internal mechanism of Platform Independent Language. Learning Java is too easy but understanding it some what difficult. Any one can create programs on java but very few people know the Internal mechanism of java concepts. In this post we are going to discuss about Internal mechanism of Platform Independent Language. As we are discussing on Java and Java is also a Platform Independent Language. So I will explain Internal meaning of Platform Independence and What is the meaning of Platform Independent Language? First of all think only one thing  that can you execute java program made in windows environment on Unix environment or vice versa? If you are unable to answer, I tell you. 'Yes' we can execute java program in any environment. For this only one thing is needed that is called JVM. Java's most powerful feature is that program written in java can we run on an...

Compilation of Java Program

Image
Compilation of Java Program Compilation of Java program is necessary before its execution. Javac is the compiler of java which compiles the source code of java program and JVM is the interpreter which generates machine code from the compiled source code. Compiling a java program we need a compiler known as JAVAC . See how to compile a java program in java programming. Compilation of a java program contains following steps- 1-Type your java program in a text editor. 2-Save it with the name of class with .java extension in your java program. 3-Now open command prompt and go to directory in which your java program has been saved. 4-Set the path of javac using set path=”path” 5-Type javac and enter file name with .java extension and press enter. 6-If your program is error free it will generate one or more .class file. 7-Type java and then file name without any extension and press enter. Now you will see output. For example if your java progr...