The type of the object pointed to by “args” is an array of Strings. It is ∴ good practice to declare it as an array of Strings.Its type is ∴ String[]. You ∴ write the type before the identifier. You ∴ write String[] args in preference to String args[] as you find in some old books.It says in the
Java Language Specification that you can write String... args instead.
If you have an anonymous class which uses any of the parameters (in this case, args), you must declare that
argumentparameter as final:
public static void main(final String... args) or
public static void main(final String[] args)
You would expect the user to enter any details at the command line, and as you have been told, anything following Kid becomes an element in the args array. You can read about it in the
Java Tutorials. Remember that numbers, etc., have to be parsed with parsing methods like
this.
The user needs to know to enter the arguments, and that goes in the documentation comments. The convention for dealing with command‑line arguments is like this:-