java创建自定义类数组方法: Student []stu = new Student[3]; for(int i = 0; i < 3; i ++){stu[i] = new Student();//每次调用时,否则会提示空指针异常 } 相关文章: