I am completely novice to the 2D arrays but so far I have been grasping the concept. Except one issue. I have an assignment that in one of the methods, a multi-dimensional array with columns and rows with lengths of other arrays, must be built. That part is done, and I figured out by now that I need a for loop within another for loop to fill it with the content of 2 other separate arrays. So I have:
int [] sot = {20, 25, 30, 35, 40, 45, 50}; int [] fet = {25, 30, 35, 40, 45, 50}; double[][] myHUT = new double [sot.length][fet.length]; public void trackerUlt(){ for (int row = 0; row < myHUT.length; row++) for (int col = 0; col < myHUT[0].length; col++) myHUT[row][col] += //???needs sot and fet array data in there. }
I just don't know how to make it so that I have all the numbers from sot and all the numbers from the fet array filled into the myHUT multi-dimensional array. Help me out.