String list = new String;
The array object has five cells.
Once an array object has been constructed, the number of cells will not change. It must be constructed with a length that will accommodate all expected data. Unfortunately, sometimes this length is hard to determine in advance. Depending on the data, the program might need differents sizes each time it is run. It would be nice if there were a type of array that allowed you to keep adding data regardless of its original length.
Say that an array has been declared and has been completely filled with information:
String list = new String; list = "ant" ; list = "bat" ; list = "cat" ;
After running for a while, the program needs to add information to the array. Will the following statement make the array larger?
list = new String;