Java program can be created by using any editor. The source code in java contains one or multiple number of classes.
Naming a java program
Java program must be saved with a .java extension. The primary name of the program must be same as class name if the class is declared as public. It can be any name if no class is declared as public. In one Java program there is only one public class.
How to compile a java program
To compile a java program in command prompt (CMD)
Syntax- javac <file_name.java>
Example- javac Hello.java
Syntax- javac <file_name.java>
Example- javac Hello.java
How to run a java program
To run a java program in command prompt
Syntax- java class_name
Example- java Hello
Syntax- java class_name
Example- java Hello
Python Training in Pune
ReplyDeletePython Training in Kharadi
Python Training in Wadgaon Sheri
Python Training in Viman Nagar
This article clearly explains the importance of mastering Core Java. Enhance your skills with Top Core JAVA Online Training in Hyderabad and work on real-time projects.
ReplyDelete