Steps to run the JAVA application:
file with a .java extension.
2. The file name should be the same as the class, which has the
main method.
3. To compile the program, using javac compiler, type the
following on the command line:
Syntax: javac <filename.java>
Example: javac abc.java
4. After compilation, run the program using the Java
interpreter.
Syntax: java <filaname> (without the .java
extension)
Example: java abc
5. The program output will be displayed on the command line.