i read this in the c# yellow book
IAccount[] accounts = new IAccount[MAX_CUST];
accounts[0] = new CustomerAccount();
accounts[0].PayInFunds(50);
i understand what an instance of class is, what interface is, what i see is instance array called IAccount with size of MAX_CUST, the index number 0 is assigned to an instance of class CustomerAccount, can you please explain what is the logic here? what is the results of the code(behind the obvious) i printed the type of these and i get what type of each individual variable is
when you do
int [] x
you know x[1] to x[9] will hold data type int
when you do
CustomeClass [] y= new CustomClass();
you know y[1] to y[9] will hold objects with CustomeClass class instance attribute, but the syntex in the book is very weird