+ 6
The syntax is confusing abit public static void main(String[ ] args)
The square brackets, are they supposed to be before the args or after it, because in some other tutorials, they are placed after the args, but here in sololearn, they are placed before.
5 Respostas
+ 8
String [] args;
It 's an array declaration
Here "String" is a variable datatype and "args" is variable name.
You can use square brackets before variable name of an array or you can use after the the name of an array.
+ 9
As you know (String[] args) is an array of strings , String is the datatype and args is the name of the array . In Java we can use square brackets with the array name or with the array type . But in other languages like c# it's not possible
+ 5
Alfred Juma Welcome. 😊
+ 3
Thanks Arafat Hossain Ar , big help man