posted 23 years ago
the JVM *does* supply a parameter.
If you invoke your program with parameters, the JVM constructs a String array of the parameters, and sends it to main.
If you invoke the program with no parameters, the JVM constructs an empty String array, and sends it to main.
No one breaks any rules in this example. But you are correct. If the method defines that you must pass two integers, or three floats, then any call to that method must pass those parameters, otherwise it is a compiler error.