głupie pytanie, da się z tych 2 pętli for zrobić 1? (x, y mają tą samą długość)
public Double [][] przebudowanieList(ArrayList<Double> x, ArrayList<Double> y)
{
Double [][] tab = new Double[x.size()][2];
int i =0;
for(Double d : x)
{
tab[i][0]= d;
i++;
}
int j =0;
for(Double d : y)
{
tab[j][1] = d;
j++;
}
return tab;
}