The default parameter for main() is always (String[] arg). When i change this to (Int arg) i get a run time error “no such method error”. I know the error is caused by changing the parameter.
My question is can I change the parameter from a String array to something else ?
Or i must always use the default, and then cast it to int using Integer.parseInt() !
The signature of the main method is fixed, you cannot change it.
You will need to convert the arguments from a string to an integer.