I am a new programmer in my first Java class . Here is my code but I am getting an error
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException:0 at CmdLine.main(CmdLine.java:13)
import java.util.Scanner;
import java.util.Arrays;
public class CmdLine{
public static void main( String [] args ){
int[] array;
array = new int [ 10 ];
for(int counter = 0; counter < array.length;counter++ )
array[counter]=Integer.parseInt (args[counter]);
System.out.printf( "%s%8s\n", "Index", "Value" );
for(int counter = 0; counter < array.length; counter++ )
System.out.printf( "%5d%8d\n", counter, array[ counter ] );
}
}