我在弄清楚为什么这不起作用时遇到了一些麻烦。有任何想法吗?
try {
Scanner scanner = new Scanner(new File("/Users/xxxxxxx/Desktop/baseball_in.txt"));
String[][] myStringArray = new String [40][40];
for (int i=0; scanner.hasNext(); i++) {
for(int x=0; x<7; x++){
myStringArray[i][x] = scanner.next();
}
}
System.out.println(Arrays.deepToString(myStringArray));
scanner.close();
} catch (FileNotFoundException e) {
}
}