public static void main(String[] a)
This should be called with a single argument of type String [] or null.
public static void main(String...a)
This call can be called with a single argument of type String [], OR with any number of String arguments, for example main ("a", "b", "c"). However, the compiler will complain if you pass null, as it cannot determine if you have a String [] value of null or an array of 1 null string.
Inside main() in any case, the variable a is equal to String[] .
Since this is main , you may not think about what it will be called ... Usually this is the first. But I switched to using the second form for all my networks; it is easier to pass arguments for testing.
source share