public class A{
}
public B extends A{
}
public C{
private A [] as;
private int num;
public C{
as = new A [5];
}
public void addA(A a){
as[num] = a;
num++;
}
public int getOfNum(){
return this.num;
}
public A getA(int index){
return this.A[index];
}
}