I have the following method that should return an array of 31 rows (with each row has 31 indexes). Here is my code:
public static int[] funcA (int[] arrayB,int[] arrayC){
int d,i;
int [] arrayA = new int[31];
int [] arrayD= new int[31];
for (d=0; d<31; d++){
int []temp = new int[31];
for (i=0; i<31; i++){
arrayA [i] = arrayB[i] ^ arrayC[i];
}
// at this point, 31 values are generated inside the arrayA.
// my problem is here: the 31 values of arrayA should be assigned to arrayD in row[d](the row has 31 indexes)
// then, an operation occur to arrayC and the values of arrayA are changed
}
return arrayD;
}
how to do this ? how to create arrayD that has two dimensions and pass 31 values (of arrayA) to a single row (of 31 indexes) every time arrayA changes (in summery, I want to store 'history' of arrayA in arrayD, so each row in D represents different states of A)?