this:
public void foo() {
for (int i = 0; i < rows; i++) // <--- no brace!
for (j = 0; j < columns; j++) // <--- no brace!
table[i][j] = new Blabla(i, j);
other();
}
or this:
public void foo() {
for (int i = 0; i < rows; i++) {
for (j = 0; j < columns; j++) {
table[i][j] = new Blabla(i ,j);
}
}
other();
}
It’s better to include the braces as otherwise someone might add an extra line thinking it will be inside the loop, but actually it will be run only once after the loop completes.