Today I restarted coding after a few months and tried do do Snake in the console. I tried to do it with a two-dimensional array and 2 for-loops.
public static void clearWindow() {
String[][] board = new String[9][]; {
for(int i=0; i<8; i++) {
for(int o=0; 0<8; o++) {
board[i][o]="O ";
System.out.print(board[i][o]);
}
System.out.println("");
}}}
The Code has 2 mistakes which I can't find. The first one happens after 10 'O's are printed. It has something to do with board[i][o]="O ";
The second mistake is the System.out.println(""); . With this line, the code won't even run.