What is wrong with this code. when it do system.out.println(matrix[0][0] i should get 1 char i get the entire line.
int r =Integer.parseInt(line.substring(0));
int c = 10;
String[][] matrix = new String[r][c];
while (line !=null)
{
for(int i =0; i< r; i++)
{
for (int j =0; j< c; j++)
{
line = br.readLine();
matrix[i][j] = line;
}
}
}
System.out.print(matrix[0][1]);
}