posted 20 years ago
You didn't show the declaration of your array blocks[][], but this line:
String value = blocks[l][k];
suggests that it's a String[][] array.
Note that String.charAt() returns a char. You cannot compare a String to a char using ==, like you're doing here:
if(value.charAt(m) == blocks[i][j]) {
And this is not going to work:
value.charAt(m) = " ";
You cannot assign a value to a return value of a method like this, and also String objects are immutable. You'll need to do something like this:
blocks[i][j] = value.substring(0, m) + ' ' + value.substring(m + 1);