Public static void Main (String arg[]) The statement defines the main method. The main method is the entrance to the program execution, and all Java programs must have a main () method, and must be defined as above. A class that does not have a Main method can be compiled, but cannot execute. Because it does not have the main method as the starting point for execution. Public is the access modifier and can be accessed from anywhere if the class member is in addition to it. Static means that you can call the main method without creating an instance of the class, because, in general, the class cannot be accessed without instantiation. However, if there is a keyword static before the method, it can be accessed directly through the class name even if the class instance is not created. Because the JVM will call the main () method before the other process, Therefore, the main () method should not rely on an instance of any class to be created and must be declared as static. The keyword void tells the compiler that when this method is executed, it does not return any values. The variables contained within the parentheses () of the main () method are the arguments passed to the method, even if the main method does not require arguments, and the method name must still have parentheses. String arg[] is a parameter passed to the main () method. arg[] is an array of string types. The arguments passed in the command line are stored in this array. A pair of curly braces for the main () method is a method block. The statement to be executed from the main method needs to be specified in this block.
public static void Main (String arg[]) detailed explanation (RPM)