你有:
gradebook = new int [numberOfStudents][examScores];
但是
examScores是一个
int[]。数组维数必须为
int,因此
examScores不能用作数组维数(鉴于字面量是多少,我可以理解您对错误的困惑:它想要一个,
int但您给了它一个
int[])。
从您的描述来看,我猜您的意思是:
gradebook = new int [numberOfStudents][numberOfExams];
哪里
numberOfExams是
int你需要的,包含考试的次数。不过,只是一个猜测。


![int []无法转换为int int []无法转换为int](http://www.mshxw.com/aiimages/31/410592.png)
