日期:2014-05-20  浏览次数:20757 次

统计全班学生成绩,求帮助修改一下,报错了
import java.util.*;
import java.io.*;
public class Tongxun
{
            //String info[][];
             
            public static void  display(String info[][])
            {
                int i;
                System.out.println("编号    姓名      性别       电话      通信地址");
                for(i=0;i<info.length;i++)
                      System.out.println(info[i][0]+"   "+info[i][1]+"   "+info[i][2]+"   "+info[i][3]+"   "+info[i][4]);
            }
          public static void  Input(String info[][])
              {
                      int i,tmp;
                      Scanner sc = new Scanner(System.in);
                      System.out.println("请输入您要添加的人的个数");
                        i=sc.nextInt();
                        sc.close();
                        System.out.println("请输入:姓名、性别、电话、通信地址,中间空格隔开");
                                  //这是用于获取键盘输入的方法
                      BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
                      String inputStr = null;
                        for (int j=0;j<i;j++)
                        {                            
                              //br.readLine():每当在键盘上输入一行内容按回车,刚输入的内容将被br读取到。
                              while ((inputStr = br.readLine()) != null)
                              {
                                  //将用户输入的字符串以逗号( )作为分隔符,分隔成个字符串
                                      String[] posStrArr = inputStr.split(" ");//拆分字符串
                                      tmp=j;
                                      info[j][0]= String.valueOf(tmp);
                                      for(int k=1;k<5;k++)
                                      {
                                           info[j][k]=posStrArr[k-1];