how to find sum of each row of 2d array in java