|
|
public keyword is an access modifier which represents visibility.
It means it is visible to all.
class keyword is used to declare a class in Java.
static is a keyword.
The core advantage of the static method is that there is no need to create an object to invoke the static method.
The main method is executed by the JVM, so it does not require to create an object to invoke the main method, and saves memory.
void is the return type of the method.
It means it does not return any value.
main represents the starting point of the program.
String[] args is used for command-line arguments.
System.out.println() is used to print statement, where System is a class, out is the object of PrintStream class, println is the method of PrintStream class.