When declaring and assigning primitives before loop everything works fine and could be different from each other later on
//example
double sum1, sum2, sum3, sum4;
sum1 = sum2 = sum3 = sum4 = 0;
//later each gets own value correctly
Is it possible to make oneliner for an array?
//example
double[][] compare, updated; // works as intended
compare = updated = new double[SIZE][]; // makes compare=updated
Problem with second line is that it ignores all following calculations for updated and takes values from compare.