I and J is suppose to end at 1 since the number on the column and letter at the top row is also part of the array. Don't ask me why, I'm just doing what my instructor told me to do.
I fixed the issue, it was pretty stupid since I was only bringing down whatever was above the row and then move on without considering the fact that the above row was also X.
Code:
private void collapseRow() {
for(int i = ROW_LIMITS; i > 0; i--) {
for(int j = COLUMN_LIMITS; j > 0; j--) {
if(grid[i][j] == "X") {
for(int k = i; k > 0; k--) {
if(grid[k][j] != "X") {
grid[i][j] = grid[k][j];
grid[k][j] = "X";
break;
}
}
}
}
}
}