So I am trying to take a txt file that is laid out like this
651111111117
200000000002
200000000002
200000000002
200001000002
200000000002
200000000002
200000000002
200000000002
200000000002
200000000002
911111111118
(each 12 numbers are a new line)
and pull it into a method in java as a 2d integer array with each digit as a new integer. I thought this would work for it but it gave me errors.
Scanner scan = new Scanner(new File("Filename.txt"));
int row=0, col=0;
while (scan.hasNextLine() == true){
while (scan.hasNextInt() == true ){
Array[row][col] = scan.nextInt();
col++;
}
row++;
}