Parent Matrix:
public static String [][] matrizPrincipal(){
String [] [] matriz = new String [2] [6];
matriz[0][0] = "Robin Arryn";
matriz[0][1] = "Lino Facioli";
matriz[0][2] = "145";
matriz[0][3] = "Vivo";
matriz[0][4] = "Arryn";
matriz[0][5] = "Masculino";
matriz[1][0] = "Yohn Royce";
matriz[1][1] = "Rupert Vansittart";
matriz[1][2] = "45";
matriz[1][3] = "Vivo";
matriz[1][4] = "Arryn";
matriz[1][5] = "Masculino";
return matriz;
}
I'm trying to create a new array that stores only content that is in column 0, that is, in the matriz[i][0]
But I'm not getting success in the new method. I'm trying to create it like this:
public static String [] [] novaMatriz(String [] [] mat){
String [] [] matriz2 = new String [mat.length] [1];
for(int i=0; i<mat.length; i++){
matriz2[i][0] = mat[i][0];
}
return matriz2;
}
What would be the problem? how to proceed When I try to call this return results in this:
[[Ljava.lang.String;@dc0772