int size = 10;
int [] dynamicArray = new int[size];
for(int i = 0; i < size; i++)
{
dynamicArray[i] = i;
}
versus the following array
int [] staticArray = new {1,2,3,4,5,6,7,8,9,10};
My question is how are the two array different. It is not clear to me that the first array is dynamic. In the chapter, the writer says that dynamic arrays do not have a predefined size, but the example above defines a size for the array and adds data elements with a for loop.