if i use
public static void main(int[] args)
the program will compile but give an error message
Exception in
thread "main" java.lang.NoSuchMethodError: main
if an array of int arguments is not alowed, why does the compiler not get all uppity about it?
gotta use
public static void main(
String[] args)
and make a new Integer object from the and call it's intValue() method to pass integer values from the command line? is this because the int is a primitive type, and only objects can be passed as arguments to main? why does the compiler allow int[] then?
just tried Integer[] as the argument to main and it gave the same error message. is String all that is allowed as an argument? seems that, as particular as the compiler is, is would flag anything else.
[This message has been edited by Eric Johnson (edited December 13, 2001).]