My input file has 84 integers and I'm not sure what I'm doing wrong.
PLEASE HELP!
import java.util.*;
import javax.swing.*;
import java.awt.*;
import java.util.Scanner;
import java.io.*;
public class Museum
{
private int Week=3;
private int Hour=4;
private int Day=7;
int[][][] visitors = new int[Week][Day][Hour];
private int[] allWeeks;
private int[] allHours;
private int[] allDays;
Scanner scanToken;
String line;
Scanner scan = new Scanner(new File("Museum_Duguay.txt"));
public Museum() throws IOException
{
line = scan.nextLine();
scanToken = new Scanner(line);
for(int a=0; a < Week; a++)
{
for(int b = 0; b < Day; b++)
{
for(int c=0; c < Hour; c++)
{
visitors[a][b][c] = scanToken.nextInt();
}
}
}
}
it highlights "visitors[a][b][c] = scanToken.nextInt();"
when the error occurs when i try to run it.