No, the array won't grow. If you are used to C/C++ and the way that C/C++ treats arrays, I think this is the cause for this confusion.
In C, a 2D array is not a double pointer. Once defined as array[x][y], it will always have x rows and y columns. Besides this, assigning a value to array[k] is simply illegal.
This is closely related to the way C treats arrays internally, the way arrays are stored into machine memory.
A
Java 2D-array does not behave like a C 2D. It is much more like double pointer or a pointer to an array in C: int * array[]. This means that array[0] can have X elements and array[1] can have Y elements.
The 2D array in java is just an array of 1D-arrays of any sizes. It's just a special case that initialization like new int[x][y] creates x 1D-arrays, all with y columns. The 1D-array elements can be reassigned and you may very well have array[k] = null !
To go back to the C comparison, think of the argv argument for the main() function, which is defined like char ** or char * argv[], meaning that the arguments may very well have different lengthes. This is the closest representation of a Java array.
I hope this answers your question.
[ October 24, 2006: Message edited by: Costi Ciudatu ]