Simple Program run in Java
There are following step write java program that is...
Step 1 : Open the Notepad
Step 2 : Write the java program on notepad.
Step 3 : Save the program by the class name Test.java, in javaprog folder just like in fig. .
Step 4 : Open the command prompt.
Step 5 : Run program like in fig.
To compile: javac Test.java
To execute: java Test
Java program run by this step.
Meaning of Java Program
- class : It is keyword use of declare a class in java.
- public : It is access modifier keyword which represents visibility. It means it is visible to all.
- static : It is a keyword. These keyword declare variable, method , block, nested class, as static, it is known as the static.
- void : It does not return any value.
- main: It represents the start up of the program.
- String args is used for command line argument.
- System.out.println() : It is used to print statement. Here, System is a class, out is the object of PrintStream class, println() is the method of PrintStream class..