private static int[] loadMarks(String fileName) throws IOException {
int[] marks = new int[94];
/* complete */
Scanner input = new Scanner(fileName);
for(int i=0;i<94;i++) {
marks[i]=input.nextInt();
}
return marks;
}
Why does this program result in an InputMismatchException?
25 views Asked by Siyanda Mbatha At
1
Try this, if your goal is to parse the contents of the file and not the actual string fileName