and store each number in local variables.
Unnar Björnsson wrote:If I understand you correctly you are overthinking the problem, you only need one loop, the loop index maps each element of ary1 to ary2 and stores it in result array in the same iteration.
Unnar Björnsson wrote:However if ary1 and ary2 are of different lengths, special care needs to be taken to either catch IndexOutOfBoundsException or perform checks each iteration.
I'm thinking I might have to make an ary2 a true array. But honestly I don't know. It makes sense though if that's it.
aryResult[size] = ary1[i] + ary2[size];
Unnar Björnsson wrote:You want to add together elements ary1+ary2 ary1+ary2 ... right?
Johnathan Beck wrote:So I am wondering does the casting DVector ary2 = (DVector) y make a copy of the array object?