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;
}
答案 0 :(得分:0)
Scanner input = new Scanner(new File(fileName));
如果您的目标是解析文件的内容而不是实际的字符串fileName
,请尝试此操作