w poniższym kodzie za nic nie moge dojść czemu metoda public int[][] ExpandedArray() nie zwraca mi nic i kompilator pluje sie ze nie ma pojecia co to jest Ary1 mimo ze jest to wejscie klasy z konstruktora. Jestem poczatkujacy i pewnie jakies bledy skladniowe ale nie wiem jakie, moze ktos rzucic okiem?
public class test {
/**
* Creates a new instance of `test`.
*/
public test() {
}
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
int[][]Ary1=new int[4][4];
for(int i=0; i<(4);i++)
{
for(int j=0; j<(4);j++){
Ary1[i][j]=i;
}
}
ExpandArray ExpanderR=new ExpandArray(Ary1);
int[][]Aryyy=ExpanderR.ExpandedArray();
}
}
class ExpandArray
{
public ExpandArray(int[][] Ary1)
{
int[][] AryEx=new int[4][4];
AryEx=Ary1;
}
public int[][] ExpandedArray()
{
int[][] arrayExpOut=new int[4][4];
arrayExpOut=Ary1;
return arrayExpOut;
}
}