The following statement creates a BankAccount array: BankAccount[] acc = new BankAccount[10]; Is it okay or not

Question:

The following statement creates a BankAccount array:

BankAccount[] acc = new BankAccount[10]; 

Is it okay or not okay to execute the following statements? 

Acc[0].setBalance(5000.0);
Acc[0].withdraw(100.0);

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: