Bueno mira el mio a ver si es asi y si es asi esta mas que completo
Código (java) [Seleccionar]
import java.util.Scanner;
public class Test2 {
public static final int NMAX_COLUMN = 4;
public static final int NMAX_ROWS = 4;
public static final Scanner scanner = new Scanner(System.in);
static void printMatriz(int matriz[][]){
System.out.println("----------------------------------------------");
for (int i=0;i<matriz.length;i++){
System.out.print("Columna: "+i+" = ");
for (int j=0;j<NMAX_ROWS;j++){
System.out.print (matriz[i][j]+ ": ");
}
System.out.println();
}System.out.println("----------------------------------------------");
}
static void pro(int matriz[][]){
System.out.println("Intercambiar Valor: ");
final int Np = scanner.nextInt();
System.out.println("Por la: ");
final int Ny = scanner.nextInt();
int temp[] = new int[NMAX_ROWS];
for(int l = 0;l < NMAX_ROWS; l++){
temp[l]=matriz[Np][l];
}for(int j=0;j<NMAX_ROWS;j++){
matriz[Np][j] = matriz[Ny][j];
matriz[Ny][j] = temp[j];
}
printMatriz(matriz);
System.out.println("Continuar? S/N");
char c =(char)scanner.next().charAt(0);
if(c=='S' || c=='s'){
pro(matriz);
}else
System.exit(0);
}
public static void main(String[] args) {
int [][]matriz = new int[NMAX_COLUMN][NMAX_ROWS];
for(int indexColumn=0; indexColumn<matriz.length; indexColumn++){
for(int indexRows=0;indexRows<NMAX_ROWS;indexRows++){
System.out.print("Columna:"+indexColumn+" Valor "+indexRows+": ");
matriz[ indexColumn][indexRows] = scanner.nextInt();
}
System.out.println();
};
printMatriz(matriz);
pro(matriz);
}
}