Hello All,
I am trying to double the size of an array and copy its contents to the new array. I keep getting the following errors with the following code snippet:
'.class' expected
not a statement
Here is my code:
private void cpyArray()
{
if(itemCount == item.length)
Doll [] temp = new Doll[item.length * 2];
for(int i = 0; i < item.length; i++)
temp [i] = item[i];
item =temp;
}
Can anyone tell me what I am doing wrong? Any help would be appreciated.
Thank you,