Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

how to sum a 2d array in java

for (int[] Array1 : Array) { //"Array" is the name of my array in this problem
            
	for (int colu = 0; colu < Array.length; colu++) { //"Colu" is the variable 
      												  //so change it on your 
      												  //code.
      sum = sum + Array1[colu];
    
	}
            
}
 
PREVIOUS NEXT
Tagged: #sum #array #java
ADD COMMENT
Topic
Name
9+3 =