Per Hansen wrote:Customer[] customers[10];
That's a declaration only. This is the same as Customer[][10] customers, or Customer customers[][10]. The issue is, you can't put a size in the declaration.
Customer[] customers = new Customer[10]; on the other hand is declaration with immediate initialization. The left hand side (declaration) doesn't specify the size, only the initialization does.