static Vector[] report=new Vector[8];

解决方案 »

  1.   

    java里不能把下标放在声明部分的
      

  2.   

    Vector[8]; //应该是个构造函数
      

  3.   

    各位说了这吗多但是我还是不知道该如何处理。
    static Vector[] report=new Vector[8]; 你的方法编译没有错误,但是如何引用那?
    是不是report[0].addElement(a)就可了?我开始这样写的好像不可以?
    :疾风摩郎
    你的观点我同意。但是我这里到底应该如何处理阿!
      

  4.   

    report[0].addElement(a);
    ~~~~~~~~~这样引用是对的,请注意a不能是基本类型的数据
      

  5.   

    创建数组是这么写的
    static Vector[] report=new Vector[8];
    使用数组前应该加上
    for(int i=0;i<report.length;i++){
      report[i]=new Vector();
    }//Good luck