There is absolutely no difference, beyond the normal differences of parameter names (as in, you have to use the right name within the method body). The name of the parameter to the main
method is entirely by convention. It's entirely valid to write:
public static void main(String[] dontUseJavaUtilDate)
as the declaration for your entry point.
From JLS 12.1.4 which uses Test
Finally, after completion of the initialization for class Test
(during which other consequential loading, linking, and initializing may have occurred), the method main of Test is invoked.
The method main must be declared public, static, and void. It must specify a formal parameter (§8.4.1) whose declared type is array of String
.
There's no specification of the parameter name.
Ditto from the JVM specification section 5.2:
The Java Virtual Machine starts up by creating an initial class, which is specified in an implementation-dependent manner, using the bootstrap class loader (§5.3.1). The Java Virtual Machine then links the initial class, initializes it, and invokes the public class method void main(String[]). The invocation of this method drives all further execution. Execution of the Java Virtual Machine instructions constituting the main method may cause linking (and consequently creation) of additional classes and interfaces, as well as invocation of additional methods.
public
,static
,void
, calledmain
and takes one parameter of typeString[]
. That being said, you can change it as much as you want as long as you still fulfil that. For examplestatic public void main(String... foo)
is still valid.