# Matrix in java program

Computer Science Level pending

the output of the program below is a matrix. how the results of the sum of the diagonal matrix

 1 2 3 4 5 6 7 8 int n[][] = {{2,4,8},{5,3,1},{0,7,9}}; for (j = 0; 3 > j; j++) { System.out.print("|"); for (int k = 0; 3 > k; k++) { System.out.print(" " + n[j][k] + " ");} System.out.println("|"); } 
×