public int[][] fileRead(String fileName);
{
Scanner problem = new Scanner(new File(fileName));
int m = 9;
int [][] tgrid = new int[m][m];
while(input.hasNextInt()){
for (int i=0;i<m;i++){
for (int j=0;j<m;j++)
a[i][j] = input.nextInt();
}
}
出於某種原因,此代碼給出了兩個語法錯誤...錯誤如下。奇怪的語法錯誤(Java)
2 errors found:
File: C:\Documents and Settings\s2813788\My Documents\Downloads\1005ICTAssignment\SudokuDriver.java [line: 81]
Error: Syntax error on token "(", ; expected
File: C:\Documents and Settings\s2813788\My Documents\Downloads\1005ICTAssignment\SudokuDriver.java [line: 81]
Error: Syntax error on token ")", delete this token
我看不出有什麼毛病的方法頭或類似的東西:|任何幫助,將不勝感激。
你能告訴什麼作爲線是線81? – elyashiv
public int [] [] fileRead(String fileName) –
@Ben Gittins發佈您的全功能源代碼,在此代碼中,我們可以看到功能結束語句中也缺少右花括號。 – gks