+ 1
Why we write public static void main(String args[]) in java?
3 ответов
+ 2
String denotes the type of the array contents. [] creates an array of this type.
args is the identifier to access the content
+ 3
Because Java is ugly for beginners.
public denotes the function as openly accessible
static means that there is only one type of this function, that shall be executed
void says, that the main function doesn't return anything
String args[] creates a String array of all the command line arguments you give to the function
+ 1
But how does the string args[] works?