I'm trying to set one character on 2D array.
map[0][2] = "0";
However, I'm getting
11011
11011
11011
11011
...
I was expecting
11011
11111
11111
11111
...
What am I doing wrong?
another example:
int arraySize = 20;
String[] blankLine = {"1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1", "1"};
String[][] blankM = new String[arraySize][];
for (int i = 0; i < arraySize; i++) {
blankM[i] = blankLine;
}
blankM[0][0] = "5";
return blankM;
It gives me in every colum [n][0] 5