For example, if I have [1,2,3,4,5,6,7,8,9] , how do I get the opposite [9.8, 7,6,5,4,3,2,1]
int n = 0, m = 0, c = 0, aux = 0;
String lista = "";
int j = 0, i = 0;
n = Integer.parseInt(JOptionPane.showInputDialog("Escriba la cantidad de filas"));
m = Integer.parseInt(JOptionPane.showInputDialog("Escriba la cantidad de columnas"));
int matriz[][] = new int[n][m];
for (i = 0; i < n; i++) {// llenado automatico
for (j = 0; j < m; j++) {
c = c + 1;
matriz[i][j] = c;
}
}