public Customer[] getAllCustomers() { for(int i = 0;i < total;i++) { } }
你要遍历的数组是哪个数组?
遍历为什么要创建新数组?没看懂你想表达什么。