Cyart
asked on
arrays
Hi,
I have a created a program that will create a single account with the code with the Class being called Account.
Account newAccount = new Account () ;
this is fine but I want to create multiple accounts without coding a new name for each account i.e. newAccount1, newAccount2
what is the syntax for this as I thought it would be something like
Account newAccount[1] = new Account () ;
I have a created a program that will create a single account with the code with the Class being called Account.
Account newAccount = new Account () ;
this is fine but I want to create multiple accounts without coding a new name for each account i.e. newAccount1, newAccount2
what is the syntax for this as I thought it would be something like
Account newAccount[1] = new Account () ;
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Account accArray[]=new Account[10];
accArray[0]=new Account();