In fact, there is no difference, I was also such a doubt, hehe;
To say the difference is to look at the following:
There is no difference in execution effect, but slightly different in grammatical sense.
For example, string and string[], the former is called a string type and the latter is called a string array type.
String args[] is a string type from a type, and from the variable itself is an array type, so it is combined to indicate that the variable is an array of string type, that is, all elements in the array are of type string.
String[] The args form is a string array type from the type, and from the variable itself is a simple reference variable, so this way can more clearly reflect whether the point of the array. Since the variable is directly visible from the type, it is a reference to an array type.
As the first sentence says, there is nothing different about the two sentences, but if you write like this.
String args[], ARGT;
String[] args, argt;
This has a very different view. In the first sentence, args is a string array type, and ARGT is a string variable. In the second sentence, both args and ARGT are string array types.
That is: string[] args, declaring a string array, named args. String args[], declaring an array called args, with a type of string.
In fact, the function is exactly the same, both ways can be written!
This is a two-way array notation,
Most programmers prefer to use string[] args as a way of writing this style, because it separates the element type string[] from the variable name clearly.
Java main function Argument String args[] and string[] args difference