You are viewing a single comment's thread. Return to all comments →
The code does not assign the line of string into a 1D array. In the code, charArray is a 2D array (an array of arrays). The line which has "charArray[i] = lines.toCharArray" converts the string to an array of characters, and this array of characters is then stored in charArray[i]. Hence, filling the i-th position of the 2D array.