class Student{
}
public static void main(String argv[]){
Student [] stus = new Student[10];
for(int i=0; i<10; i++){
stus[i] = new Student();
}
}
public class Students{
private Student[] stus;
private int size;
Stuents(){
this(10);
}
Students(int capacity){
stus=new Student[capacity];
}
pubic void addStu(){
for(int i=0;i
size++;
}
}
}
class Studet{}
数组里只能放数字吧,哪里可以放对象了,放对象用vector好了。往vector添加对象用add()