public static void main(String [] args)
Those are for command-line arguments in Java.
In other words, if you run
java MyProgram one twoThen args contains:
[ "one", "two" ]
public static void main(String [] args) {
String one = args[0]; //=="one"
String two = args[1]; //=="two"
}
The reason for this is to configure your application to run a
particular way or provide it with some piece of information it needs.
No comments:
Post a Comment