Vector d[];public construtor{       d = new Vector[6];
       if(d[0] == NULL)
           System.out.println("NULL");
       else
           System.out.println(" Not NULL");
}为什么输出的是NULL

解决方案 »

  1.   

    这个……看语法不像Java……
    那个NULL是哪儿来的?
      

  2.   

    .........
    Vector d[];public construtor{       d = new Vector[6];
           if(d[0] == null)
               System.out.println("NULL");
           else
               System.out.println(" Not NULL");
    }写点关键代码而已...
    没NULL,有 null啊。关键是为什么不能创建数组这个是我用来测试VECTOR写的一个判断而已果然是没有分配空间....为什么会这样呢
      

  3.   

    你Vector都没有初始化,当然是null了