Please consider this scenario:
char[] array = new char[4];
array[0] = 'a';
array[1] = '3';
array[3] = 'q';
As you can see, array[2]
was never 'filled' with anything. What would be the value of array[2]
?
What do I need to check for when iterating through a char
array, looking for 'empty' cells?