So what I'm trying to do is pass the values of one class to the other. So with the code i have i believe what is happening is im not passing the values. But im passing the referenced location.
import java.util.Arrays;
public class numbers {
int[][] x = {{6,10,14,31,32},{12,23,12,11,22}};
public void setX (int[][] x){
this.x = x;
}
public int[][] getX() {
return this.x;
}
}
Theres the array with the values.
import java.util.Arrays;
public class Probability {
public static void main(String args[]) {
numbers aNumbers = new numbers();
int[][] x = aNumbers.getX();
for(int z=0; z<=x.length-1;z++)
System.out.println(aNumbers.getX());;
}
}
Heres the class that id like to recive the array.
But this is my output -
[[I@1747b17
[[I@1747b17
-
Now theres more than likely a stupidly easy solution to this.