You may want to change this part
public static void main(String[] args) throws IOException {
int[][] studentinfo = {};
int students_num = 0;
System.out.println("[성적처리 프로그램]\n몇명의 학생들의 data를 입력하시겠습니까?");
Scanner s = new Scanner(System.in);
students_num = s.nextInt();
addinfo(students_num, studentinfo);
s.close();
}
As
public static void main(String[] args) throws IOException {
int students_num = 0;
System.out.println("[성적처리 프로그램]\n몇명의 학생들의 data를 입력하시겠습니까?");
Scanner s = new Scanner(System.in);
students_num = s.nextInt();
int[][] studentinfo = new int[students_num][7];
addinfo(students_num, studentinfo);
s.close();
}