I'm somewhat new to Java and programming in general and I am receiving this error when I run my program and I have zero idea as to what is causing it. Thanks in advance.
public class AssignmentEight
{
static final String INFILE_NAME = "ass8_input.txt";
/**
* @param args
*/
public static void main(String[] args)
{
Scanner inFile = null;
try
{
inFile = new Scanner(new File(INFILE_NAME));
}
catch(FileNotFoundException e)
{
System.out.println("Error: " + e.getMessage());
System.exit(1);
}
int count = inFile.nextInt();
double checkSum = 0;
for(int ii = 0; ii < count; ++ii)
{
int[] numbers = new int[ii];
numbers[ii] = inFile.nextInt();
System.out.println(numbers[ii]);
}
}
}