Using args is just a convention, all of the following would be fine and compile:
public static void main(String args[])
public static void main(String abc[])
public static void main(String anythingElse[])
However; there is annother (arguably more important) convention you are ignoring that will trip you up down the road.
Its usually
public static void main(String[] args)
Doing it the other way round will work, but is confusing because the general assumption is
TypeDefinition variableName
What is the type, is it a String
? No, no it is not, its an array of strings, which we represent by String[]
. Is the variable name args[]. No its just args