The main method is the entrance of java program. Remember, we won't discuss Servlet, MIDlet and any other container-managed java programs here. In Java kernel programming, JVM will look for public static void main (string [] args) in the class. If this method cannot be found, it will throw an error: main program terminated.
The Main method must strictly follow its grammar rules, the method signature must be public static void, and the parameter is string array type. If it is Java 1.5 and later, you can also use variable parameters: