请教一个类型转化的错误。
xhuad 2004-09-22 04:26:35 public customer[] getCustomer(){
/*customer[] customers = new customer[this.cust.size()];
for(int i = 0;i < cust.size(); i++)
{
customers[i] = ((customer)this.cust.elementAt(i));
}
return customers;*/
return ((customer[])cust.toArray());
}
customer是我自己建的一个类,我现在要返回Vector的cust,用以上注释的代码可以实现,为何用
以上的代码不能实现,请指教,谢谢!