Here you can find the source of sumIntArray(int[] array)
Parameter | Description |
---|---|
array | a parameter |
public static int sumIntArray(int[] array)
//package com.java2s; public class Main { /**/*ww w . jav a2 s. c o m*/ * Sums an array of integers and returns it. * * @param array * @return */ public static int sumIntArray(int[] array) { int sum = 0; for (int i : array) sum += i; return sum; } }