Hi, Please check this
import TerminalIO.KeyboardReader;
public class manyStudents {
public static void main (String [] args) {
KeyboardReader reader = new KeyboardReader();
Student[] student = new Student[500];
int stuNumb = reader.readInt ("Enter the number of students (max is 500): ");
for (int i = 0; i < stuNumb; i++) {
String stuName = reader.readLine ("Enter the name of sutden #"+ (i+1) +": ");
student[i].setName(stuName);
int testNumb = reader.readInt ("Enter the number of tests for "+ student[i].getName() +": ");
}
}
}
This code gives me a null pointer exception at line 11...
why? how can i fix it?
Thanks