实际上,input函数可以不需要返回值void input(Student [][]stu, int c, int d){}在main中,可以写成:Student [][]stu=new Student[c][];input(stu,c,d); 这样执行完input方法后,stu变量就已经包含所有的student了。