Skip to content

Instantly share code, notes, and snippets.

@bkyrlach
Created February 16, 2020 15:46
Show Gist options
  • Select an option

  • Save bkyrlach/abe49f6e85720f99d36227e8e7e237e9 to your computer and use it in GitHub Desktop.

Select an option

Save bkyrlach/abe49f6e85720f99d36227e8e7e237e9 to your computer and use it in GitHub Desktop.
char[][] board = new char[3][3];
// for(int i = 0; i < board.length; i++) {
// board[i] = new int[3];
// }
for(int i = 0; i < board.length; i++) {
char[] row = board[i];
for(int j = 0; j < row.length; j++) {
row[j] = 'a' + 3;
}
}
for(int i = 0; i < board.length; i++) {
char[] row = board[i];
for(int j = 0; j < row.length; j++) {
System.out.print(row[j]);
}
System.out.println();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment