public class TestSample {
public static void main(String[] args) {
System.out.print("Hi, ");
System.out.print(args[0]);
System.out.println(". How are you?");
}
}
When I compile this program, I get this error:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
Also, why can't I have an args which accepts an int array like this:
public static void main(int[] args) {