Compilation of Java Program
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...