This is a repeat fo your previous question at
How can I store students scores outside the loop in a 2D jagged array? ([
^]. Go back there and read my suggestions again. You must allocate the main array before you start the loop, based on the number of students:
System.out.println("How many students do you have?");
int n = scanner.nextInt();
int[][] scores = new int[n][];
Then when you start each new student's entries inside the main loop, you need to allocate the student array as I suggested in the other question.