Compiling and executing a java program is done in the command prompt in Windows.
Compiling a program
Executing a java program
javac : The java compiler.
file_name : Name of the file with which the java program is saved. The file should be saved with a .java extension.
java : The java interpreter.
class_name : Name of the class in which the main() is written.
Note : When a class is declared public, the class name and the file name should be matched.
Compiling a program
Executing a java program
javac : The java compiler.
file_name : Name of the file with which the java program is saved. The file should be saved with a .java extension.
java : The java interpreter.
class_name : Name of the class in which the main() is written.
Note : When a class is declared public, the class name and the file name should be matched.
No comments:
Post a Comment