How can I print out a simple int[][] in the matrix box format like the format in which we handwrite matrices in. A simple run of loops doesn't apparently work. If it helps I'm trying to compile this code in a linux ssh terminal.
for (int i = 0; i < rows; i++) { for (int j = 0; j < cols; j++) { System.out.println(matrix[i][j] + " "); } System.out.println(); } 