Question: Use java to print out sum of two dimensional array Please print out sum of each row and sum of each columns. Clearly indicate the
Twodimentional.java Downloads/Twodimentionaljava. 2 //write the pupose of program? 3 I am trying to print out sum of each rows and sum of each column 5public class Twodimentional f 6public static void main(String[) args) t ArraySort objArray new ArraySort); int [][] arr { 4,5,6 1,2,3 10 13 14 15 16 17 18 19class ArraySort f objArray.getcolumnSum(arr): 20 21 public void getcolumnSun(int arg) int I colsSum new int [31: 23 24 25 colsSum[11 ; colsSun12] 26 System.out.print In("The sum of arrays:") for( int i++) iarg.Length; for(int j jcarg[i].length; j++) 27 28 i-e; System.out.print(argilj" 31 else if(j-1) else 34 35 36 37 38 System.out.println() 41" for( int i-0; ?ccolsSun-length; i++){ System.out.print(colsSumtil" 45 46 47 F4 FS
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
